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

Commit

Permalink
feat(debug): replacing deprecated gulp-node-inspector with vanilla no…
Browse files Browse the repository at this point in the history
…de-inspector
  • Loading branch information
lirantal committed Oct 13, 2016
1 parent 8645b24 commit 19145b9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 27 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
FROM ubuntu:latest
MAINTAINER MEAN.JS

# 80 = HTTP, 443 = HTTPS, 3000 = MEAN.JS server, 35729 = livereload
EXPOSE 80 443 3000 35729
# 80 = HTTP, 443 = HTTPS, 3000 = MEAN.JS server, 35729 = livereload, 8080 = node-inspector
EXPOSE 80 443 3000 35729 8080

# Set development environment as default
ENV NODE_ENV development
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
ports:
- "3000:3000"
- "5858:5858"
- "8080:8080"
- "35729:35729"
environment:
- NODE_ENV=development
Expand Down
27 changes: 5 additions & 22 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,16 @@ gulp.task('nodemon', function () {
script: 'server.js',
nodeArgs: ['--debug'],
ext: 'js,html',
verbose: true,
watch: _.union(defaultAssets.server.views, defaultAssets.server.allJS, defaultAssets.server.config)
});
});

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 () {
// Nodemon task without verbosity or debugging
gulp.task('nodemon-nodebug', function () {
return plugins.nodemon({
script: 'server.js',
nodeArgs: ['--debug'],
ext: 'js,html',
verbose: true,
watch: _.union(defaultAssets.server.views, defaultAssets.server.allJS, defaultAssets.server.config)
});
});
Expand Down Expand Up @@ -463,10 +446,10 @@ gulp.task('default', function (done) {

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

// Run the project in production mode
gulp.task('prod', function (done) {
runSequence(['copyLocalEnvConfig', 'makeUploadsDir', 'templatecache'], 'build', 'env:prod', 'lint', ['nodemon', 'watch'], done);
runSequence(['copyLocalEnvConfig', 'makeUploadsDir', 'templatecache'], 'build', 'env:prod', 'lint', ['nodemon-nodebug', 'watch'], done);
});
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"update": "npm update && npm prune && bower install --allow-root && bower prune --allow-root",
"start": "gulp",
"start:prod": "gulp prod",
"start:debug": "gulp debug",
"start:debug": "node-debug --web-host 0.0.0.0 server.js & gulp debug",
"gulp": "gulp",
"lint": "gulp lint",
"test": "gulp test",
Expand Down Expand Up @@ -92,7 +92,6 @@
"gulp-load-plugins": "~1.3.0",
"gulp-mocha": "~3.0.1",
"gulp-ng-annotate": "~2.0.0",
"gulp-node-inspector": "~0.1.0",
"gulp-nodemon": "~2.2.1",
"gulp-protractor": "~3.0.0",
"gulp-rename": "~1.2.2",
Expand All @@ -111,7 +110,7 @@
"karma-phantomjs-launcher": "~1.0.0",
"lcov-result-merger": "~1.2.0",
"mock-fs": "~3.11.0",
"node-inspector": "~0.12.7",
"node-inspector": "~0.12.8",
"run-sequence": "~1.2.2",
"semver": "~5.3.0",
"should": "~11.1.0",
Expand Down

0 comments on commit 19145b9

Please sign in to comment.