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

Commit b198ca7

Browse files
authored
feat(gulp) - refactoring gulpfile to properly add support for node-inspector as its own dedicated gulp task (#1395)
1 parent 0934f87 commit b198ca7

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

gulpfile.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,25 @@ gulp.task('nodemon', function () {
5353
});
5454
});
5555

56+
gulp.task('node-inspector', function() {
57+
gulp.src([])
58+
.pipe(plugins.nodeInspector({
59+
debugPort: 5858,
60+
webHost: '0.0.0.0',
61+
webPort: 1337,
62+
saveLiveEdit: false,
63+
preload: true,
64+
inject: true,
65+
hidden: [],
66+
stackTraceLimit: 50,
67+
sslKey: '',
68+
sslCert: ''
69+
}));
70+
});
71+
5672
// Nodemon debug task
5773
gulp.task('nodemon-debug', function () {
5874
return plugins.nodemon({
59-
exec: 'node_modules/node-inspector/bin/inspector.js --save-live-edit --preload=false --web-port 1337 & node --debug',
6075
script: 'server.js',
6176
nodeArgs: ['--debug'],
6277
ext: 'js,html',
@@ -396,7 +411,7 @@ gulp.task('default', function (done) {
396411

397412
// Run the project in debug mode
398413
gulp.task('debug', function (done) {
399-
runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['nodemon-debug', 'watch'], done);
414+
runSequence('env:dev', ['copyLocalEnvConfig', 'makeUploadsDir'], 'lint', ['node-inspector', 'nodemon-debug', 'watch'], done);
400415
});
401416

402417
// Run the project in production mode

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"glob": "~7.0.0",
5252
"grunt": "~1.0.1",
5353
"grunt-cli": "~1.2.0",
54+
"gulp-node-inspector": "~0.1.0",
5455
"helmet": "~1.3.0",
5556
"jasmine-core": "~2.4.1",
5657
"lodash": "~4.6.1",

0 commit comments

Comments
 (0)