From 671e075c5e642627ccbd03cf71226d8d5f2ec897 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 23 Feb 2017 11:32:16 -0800 Subject: Use closurebuilder.py in favor of calcdeps.py for compiling JavaScript There are two motivations for this: 1) calcdeps.py is deprecated and replaced by closurebuilder.py. 2) As part of this I was able to tweak things so that the Closure compiler does not attempt to examine every .js file in the tree under js/. This makes it possible to put compatibility tests and related files in a subdirectory without them getting mixed up with the main .js files we care about. --- js/commonjs/export.js | 4 ++++ js/commonjs/export_asserts.js | 4 ++++ js/commonjs/export_testdeps.js | 4 ++++ 3 files changed, 12 insertions(+) (limited to 'js/commonjs') diff --git a/js/commonjs/export.js b/js/commonjs/export.js index 1eaab5d5..a93ee928 100644 --- a/js/commonjs/export.js +++ b/js/commonjs/export.js @@ -5,6 +5,10 @@ * the google-protobuf.js file that we build at distribution time. */ +// Include a dummy provide statement so that closurebuilder.py does not skip over this +// file. +goog.provide('jspb.Export'); + goog.require('goog.object'); goog.require('jspb.BinaryReader'); goog.require('jspb.BinaryWriter'); diff --git a/js/commonjs/export_asserts.js b/js/commonjs/export_asserts.js index 5219d120..ad9446c7 100644 --- a/js/commonjs/export_asserts.js +++ b/js/commonjs/export_asserts.js @@ -6,6 +6,10 @@ * closure_asserts_commonjs.js that is only used at testing time. */ +// Include a dummy provide statement so that closurebuilder.py does not skip over this +// file. +goog.provide('jspb.ExportAsserts'); + goog.require('goog.testing.asserts'); var global = Function('return this')(); diff --git a/js/commonjs/export_testdeps.js b/js/commonjs/export_testdeps.js index 174c61e6..6f5cd083 100644 --- a/js/commonjs/export_testdeps.js +++ b/js/commonjs/export_testdeps.js @@ -7,6 +7,10 @@ * export_asserts.js. */ +// Include a dummy provide statement so that closurebuilder.py does not skip over this +// file. +goog.provide('jspb.ExportTestDeps'); + goog.require('goog.crypt.base64'); goog.require('jspb.arith.Int64'); goog.require('jspb.arith.UInt64'); -- cgit v1.2.3