From 0b13107d651e3a43b2161ab93c150ff8a3489fe0 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Sun, 6 Mar 2016 22:00:59 +0200 Subject: [PATCH] fix(gulp) remove gulp-node-inspector dependency --- gulpfile.js | 28 +++++++++++++--------------- package.json | 2 +- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index eea17ffa..f1a9cde6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -50,6 +50,18 @@ gulp.task('nodemon', function () { }); }); +// Nodemon debug task +gulp.task('nodemon-debug', function () { + return plugins.nodemon({ + exec: 'node_modules/node-inspector/bin/inspector.js --save-live-edit --preload=false --web-port 1337 & node --debug', + script: 'server.js', + nodeArgs: ['--debug'], + ext: 'js,html', + verbose: true, + watch: _.union(defaultAssets.server.views, defaultAssets.server.allJS, defaultAssets.server.config) + }); +}); + // Watch Files For Changes gulp.task('watch', function () { // Start livereload @@ -203,20 +215,6 @@ gulp.task('imagemin', function () { .pipe(gulp.dest('public/dist/img')); }); -// node-inspector task -gulp.task('node-inspector', function () { - return gulp.src([]) - .pipe(plugins.nodeInspector({ - debugPort: 5858, - webHost: 'localhost', - webPort: 1337, - saveLiveEdit: true, - preload: false, - hidden: [], - stackTraceLimit: 50, - })); -}); - // Copy local development environment config example gulp.task('copyLocalEnvConfig', function () { var src = []; @@ -376,7 +374,7 @@ gulp.task('default', function (done) { // Run the project in debug mode gulp.task('debug', function (done) { - runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon', 'watch', 'node-inspector'], done); + runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon-debug', 'watch'], done); }); // Run the project in production mode diff --git a/package.json b/package.json index e07bf15f..62167bb6 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "gulp-mocha": "~2.2.0", "gulp-ng-annotate": "~1.1.0", "gulp-nodemon": "~2.0.6", - "gulp-node-inspector": "~0.1.0", "gulp-protractor": "~1.0.0", "gulp-rename": "~1.2.2", "gulp-sass": "~2.2.0", @@ -119,6 +118,7 @@ "karma-phantomjs-launcher": "~1.0.0", "load-grunt-tasks": "~3.2.0", "mock-fs": "~3.7.0", + "node-inspector": "~0.12.7", "run-sequence": "~1.1.5", "should": "~8.2.2", "supertest": "~1.2.0",