diff --git a/gulpfile.js b/gulpfile.js index 3419f1c17f..eea17ffa8d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -203,6 +203,20 @@ 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 = []; @@ -362,7 +376,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'], done); + runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon', 'watch', 'node-inspector'], done); }); // Run the project in production mode diff --git a/package.json b/package.json index 1af5d135c5..9830678964 100644 --- a/package.json +++ b/package.json @@ -100,6 +100,7 @@ "gulp-mocha": "~2.1.2", "gulp-ng-annotate": "~1.0.0", "gulp-nodemon": "~2.0.3", + "gulp-node-inspector": "~0.1.0", "gulp-protractor": "~1.0.0", "gulp-rename": "~1.2.2", "gulp-sass": "~2.0.3",