gulpfile.js 858 B

1234567891011121314151617181920212223242526272829
  1. var gulp = require('gulp');
  2. var exec = require('child_process').exec;
  3. gulp.task('genproto', function (cb) {
  4. exec('../src/protoc --js_out=library=testproto_libs,binary:. -I ../src -I . *.proto ../src/google/protobuf/descriptor.proto',
  5. function (err, stdout, stderr) {
  6. console.log(stdout);
  7. console.log(stderr);
  8. cb(err);
  9. });
  10. })
  11. gulp.task('deps', ['genproto'], function (cb) {
  12. exec('./node_modules/google-closure-library/closure/bin/build/depswriter.py *.js binary/*.js > deps.js',
  13. function (err, stdout, stderr) {
  14. console.log(stdout);
  15. console.log(stderr);
  16. cb(err);
  17. });
  18. })
  19. gulp.task('test', ['genproto', 'deps'], function (cb) {
  20. exec('JASMINE_CONFIG_PATH=jasmine.json ./node_modules/.bin/jasmine',
  21. function (err, stdout, stderr) {
  22. console.log(stdout);
  23. console.log(stderr);
  24. cb(err);
  25. });
  26. });