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

Commit

Permalink
feat(gulp) - refactoring gulpfile to properly add support for node-in…
Browse files Browse the repository at this point in the history
…spector as its own dedicated gulp task (#1395)
  • Loading branch information
lirantal authored Jul 23, 2016
1 parent 0934f87 commit b198ca7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
19 changes: 17 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,25 @@ gulp.task('nodemon', function () {
});
});

gulp.task('node-inspector', function() {
gulp.src([])
.pipe(plugins.nodeInspector({
debugPort: 5858,
webHost: '0.0.0.0',
webPort: 1337,
saveLiveEdit: false,
preload: true,
inject: true,
hidden: [],
stackTraceLimit: 50,
sslKey: '',
sslCert: ''
}));
});

// 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',
Expand Down Expand Up @@ -396,7 +411,7 @@ gulp.task('default', function (done) {

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

// Run the project in production mode
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"glob": "~7.0.0",
"grunt": "~1.0.1",
"grunt-cli": "~1.2.0",
"gulp-node-inspector": "~0.1.0",
"helmet": "~1.3.0",
"jasmine-core": "~2.4.1",
"lodash": "~4.6.1",
Expand Down

0 comments on commit b198ca7

Please sign in to comment.