gulpfile.js 548 B

1234567891011121314151617181920
  1. const gulp = require('gulp')
  2. const nodemon = require('gulp-nodemon')
  3. var jsScript = 'node';
  4. if (process.env.npm_config_argv.indexOf('debug') > 0) {
  5. jsScript = 'node debug';
  6. }
  7. gulp.task('nodemon', function (){
  8. return nodemon({
  9. script : 'index.js',
  10. ext : 'js json',
  11. execMap: {js: jsScript},
  12. env : {NODE_ENV: 'development'},
  13. verbose: true,
  14. ignore : ['build/*.js', 'dist/*.js', 'nodemon.json', '.git', 'node_modules/**/node_modules', 'gulpfile.js'],
  15. });
  16. });
  17. gulp.task('default', ['nodemon'], function () {});