diff --git a/js/commonjs_export.js b/js/commonjs/export.js similarity index 100% rename from js/commonjs_export.js rename to js/commonjs/export.js diff --git a/js/commonjs_export_asserts.js b/js/commonjs/export_asserts.js similarity index 100% rename from js/commonjs_export_asserts.js rename to js/commonjs/export_asserts.js diff --git a/js/jasmine_commonjs.json b/js/commonjs/jasmine.json similarity index 100% rename from js/jasmine_commonjs.json rename to js/commonjs/jasmine.json diff --git a/js/rewrite_tests_for_commonjs.js b/js/commonjs/rewrite_tests_for_commonjs.js similarity index 100% rename from js/rewrite_tests_for_commonjs.js rename to js/commonjs/rewrite_tests_for_commonjs.js diff --git a/js/gulpfile.js b/js/gulpfile.js index 22f8f3fd5d..bdc4212b24 100644 --- a/js/gulpfile.js +++ b/js/gulpfile.js @@ -23,7 +23,7 @@ gulp.task('genproto_commonjs', function (cb) { gulp.task('dist', function (cb) { // TODO(haberman): minify this more aggressively. // Will require proper externs/exports. - exec('./node_modules/google-closure-library/closure/bin/calcdeps.py -i message.js -i binary/reader.js -i binary/writer.js -i commonjs_export.js -p . -p node_modules/google-closure-library/closure -o compiled --compiler_jar node_modules/google-closure-compiler/compiler.jar > google-protobuf.js', + exec('./node_modules/google-closure-library/closure/bin/calcdeps.py -i message.js -i binary/reader.js -i binary/writer.js -i commonjs/export.js -p . -p node_modules/google-closure-library/closure -o compiled --compiler_jar node_modules/google-closure-compiler/compiler.jar > google-protobuf.js', function (err, stdout, stderr) { console.log(stdout); console.log(stderr); @@ -32,7 +32,7 @@ gulp.task('dist', function (cb) { }); gulp.task('commonjs_asserts', function (cb) { - exec('mkdir -p commonjs_out && ./node_modules/google-closure-library/closure/bin/calcdeps.py -i commonjs_export_asserts.js -p . -p node_modules/google-closure-library/closure -o compiled --compiler_jar node_modules/google-closure-compiler/compiler.jar > commonjs_out/closure_asserts_commonjs.js', + exec('mkdir -p commonjs_out && ./node_modules/google-closure-library/closure/bin/calcdeps.py -i commonjs/export_asserts.js -p . -p node_modules/google-closure-library/closure -o compiled --compiler_jar node_modules/google-closure-compiler/compiler.jar > commonjs_out/closure_asserts_commonjs.js', function (err, stdout, stderr) { console.log(stdout); console.log(stderr); @@ -45,7 +45,7 @@ gulp.task('make_commonjs_out', ['dist', 'genproto_commonjs', 'commonjs_asserts'] // Will require proper externs/exports. var cmd = "mkdir -p commonjs_out/binary && "; function addTestFile(file) { - cmd += 'nodejs rewrite_tests_for_commonjs.js < ' + file + + cmd += 'nodejs commonjs/rewrite_tests_for_commonjs.js < ' + file + ' > commonjs_out/' + file + '&& '; } @@ -53,7 +53,7 @@ gulp.task('make_commonjs_out', ['dist', 'genproto_commonjs', 'commonjs_asserts'] glob.sync('binary/*_test.js').forEach(addTestFile); exec(cmd + - 'cp jasmine_commonjs.json commonjs_out/jasmine.json && ' + + 'cp commonjs/jasmine.json commonjs_out/jasmine.json && ' + 'cp google-protobuf.js commonjs_out', function (err, stdout, stderr) { console.log(stdout);