Moved CommonJS-specific files to commonjs/.

This commit is contained in:
Josh Haberman 2016-02-04 10:38:06 -08:00
parent e9f31ee3d7
commit 9e60036c1b
5 changed files with 4 additions and 4 deletions

View File

@ -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);