aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorGravatar Josh Haberman <jhaberman@gmail.com>2016-06-16 18:40:07 -0700
committerGravatar Josh Haberman <jhaberman@gmail.com>2016-06-16 18:40:07 -0700
commit104723fccf4c9f7bf2398073e6b04390dcd2298a (patch)
tree8169963ea4b4c3c0bd7283011e46e5979004319f /js
parent4308cc4d4600c68e8d0bf94adda7a1149d709f44 (diff)
Fix tests for CommonJS.
Diffstat (limited to 'js')
-rw-r--r--js/gulpfile.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/gulpfile.js b/js/gulpfile.js
index b6ee7c57..cca99131 100644
--- a/js/gulpfile.js
+++ b/js/gulpfile.js
@@ -33,7 +33,16 @@ gulp.task('genproto_closure', function (cb) {
});
gulp.task('genproto_commonjs', function (cb) {
- exec('mkdir -p commonjs_out && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out -I ../src -I commonjs -I . *.proto commonjs/test*/*.proto ../src/google/protobuf/descriptor.proto' + wellKnownTypes.join(' '),
+ exec('mkdir -p commonjs_out && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out -I ../src -I commonjs -I . *.proto commonjs/test*/*.proto ../src/google/protobuf/descriptor.proto',
+ function (err, stdout, stderr) {
+ console.log(stdout);
+ console.log(stderr);
+ cb(err);
+ });
+});
+
+gulp.task('genproto_commonjs_wellknowntypes', function (cb) {
+ exec('mkdir -p commonjs_out/node_modules/google-protobuf && ' + protoc + ' --js_out=import_style=commonjs,binary:commonjs_out/node_modules/google-protobuf -I ../src ../src/google/protobuf/descriptor.proto',
function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
@@ -79,7 +88,7 @@ gulp.task('commonjs_testdeps', function (cb) {
});
});
-gulp.task('make_commonjs_out', ['dist', 'genproto_commonjs', 'commonjs_asserts', 'commonjs_testdeps'], function (cb) {
+gulp.task('make_commonjs_out', ['dist', 'genproto_commonjs', 'genproto_commonjs_wellknowntypes', 'commonjs_asserts', 'commonjs_testdeps'], function (cb) {
// TODO(haberman): minify this more aggressively.
// Will require proper externs/exports.
var cmd = "mkdir -p commonjs_out/binary && mkdir -p commonjs_out/test_node_modules && ";