Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Commit 936379d

Browse files
committed
feat(gulp): Add node-inspector task to Gulp
1 parent a069531 commit 936379d

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

gulpfile.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,20 @@ gulp.task('imagemin', function () {
203203
.pipe(gulp.dest('public/dist/img'));
204204
});
205205

206+
// node-inspector task
207+
gulp.task('node-inspector', function () {
208+
return gulp.src([])
209+
.pipe(plugins.nodeInspector({
210+
debugPort: 5858,
211+
webHost: 'localhost',
212+
webPort: 1337,
213+
saveLiveEdit: true,
214+
preload: false,
215+
hidden: [],
216+
stackTraceLimit: 50,
217+
}));
218+
});
219+
206220
// Copy local development environment config example
207221
gulp.task('copyLocalEnvConfig', function () {
208222
var src = [];
@@ -362,7 +376,7 @@ gulp.task('default', function (done) {
362376

363377
// Run the project in debug mode
364378
gulp.task('debug', function (done) {
365-
runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon', 'watch'], done);
379+
runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon', 'watch', 'node-inspector'], done);
366380
});
367381

368382
// Run the project in production mode

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
"gulp-mocha": "~2.1.2",
101101
"gulp-ng-annotate": "~1.0.0",
102102
"gulp-nodemon": "~2.0.3",
103+
"gulp-node-inspector": "~0.1.0",
103104
"gulp-protractor": "~1.0.0",
104105
"gulp-rename": "~1.2.2",
105106
"gulp-sass": "~2.0.3",

0 commit comments

Comments
 (0)