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

Commit 19145b9

Browse files
committed
feat(debug): replacing deprecated gulp-node-inspector with vanilla node-inspector
1 parent 8645b24 commit 19145b9

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
FROM ubuntu:latest
1111
MAINTAINER MEAN.JS
1212

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

1616
# Set development environment as default
1717
ENV NODE_ENV development

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
ports:
88
- "3000:3000"
99
- "5858:5858"
10+
- "8080:8080"
1011
- "35729:35729"
1112
environment:
1213
- NODE_ENV=development

gulpfile.js

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -51,33 +51,16 @@ gulp.task('nodemon', function () {
5151
script: 'server.js',
5252
nodeArgs: ['--debug'],
5353
ext: 'js,html',
54+
verbose: true,
5455
watch: _.union(defaultAssets.server.views, defaultAssets.server.allJS, defaultAssets.server.config)
5556
});
5657
});
5758

58-
gulp.task('node-inspector', function() {
59-
gulp.src([])
60-
.pipe(plugins.nodeInspector({
61-
debugPort: 5858,
62-
webHost: '0.0.0.0',
63-
webPort: 1337,
64-
saveLiveEdit: false,
65-
preload: true,
66-
inject: true,
67-
hidden: [],
68-
stackTraceLimit: 50,
69-
sslKey: '',
70-
sslCert: ''
71-
}));
72-
});
73-
74-
// Nodemon debug task
75-
gulp.task('nodemon-debug', function () {
59+
// Nodemon task without verbosity or debugging
60+
gulp.task('nodemon-nodebug', function () {
7661
return plugins.nodemon({
7762
script: 'server.js',
78-
nodeArgs: ['--debug'],
7963
ext: 'js,html',
80-
verbose: true,
8164
watch: _.union(defaultAssets.server.views, defaultAssets.server.allJS, defaultAssets.server.config)
8265
});
8366
});
@@ -463,10 +446,10 @@ gulp.task('default', function (done) {
463446

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

469452
// Run the project in production mode
470453
gulp.task('prod', function (done) {
471-
runSequence(['copyLocalEnvConfig', 'makeUploadsDir', 'templatecache'], 'build', 'env:prod', 'lint', ['nodemon', 'watch'], done);
454+
runSequence(['copyLocalEnvConfig', 'makeUploadsDir', 'templatecache'], 'build', 'env:prod', 'lint', ['nodemon-nodebug', 'watch'], done);
472455
});

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"update": "npm update && npm prune && bower install --allow-root && bower prune --allow-root",
1919
"start": "gulp",
2020
"start:prod": "gulp prod",
21-
"start:debug": "gulp debug",
21+
"start:debug": "node-debug --web-host 0.0.0.0 server.js & gulp debug",
2222
"gulp": "gulp",
2323
"lint": "gulp lint",
2424
"test": "gulp test",
@@ -92,7 +92,6 @@
9292
"gulp-load-plugins": "~1.3.0",
9393
"gulp-mocha": "~3.0.1",
9494
"gulp-ng-annotate": "~2.0.0",
95-
"gulp-node-inspector": "~0.1.0",
9695
"gulp-nodemon": "~2.2.1",
9796
"gulp-protractor": "~3.0.0",
9897
"gulp-rename": "~1.2.2",
@@ -111,7 +110,7 @@
111110
"karma-phantomjs-launcher": "~1.0.0",
112111
"lcov-result-merger": "~1.2.0",
113112
"mock-fs": "~3.11.0",
114-
"node-inspector": "~0.12.7",
113+
"node-inspector": "~0.12.8",
115114
"run-sequence": "~1.2.2",
116115
"semver": "~5.3.0",
117116
"should": "~11.1.0",

0 commit comments

Comments
 (0)