Skip to content

Instantly share code, notes, and snippets.

@johnpapa
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnpapa/32dd849ec6f5b2bd3862 to your computer and use it in GitHub Desktop.
Save johnpapa/32dd849ec6f5b2bd3862 to your computer and use it in GitHub Desktop.
task that wont debug
var gulp = require('gulp');
var $ = require('gulp-load-plugins')({ lazy: true });
gulp.task('serve-dev', function () {
log(process.argv);
var nodeOptions = {
script: './src/server/app.js',
delayTime: 1,
env: {
'PORT': 8001,
'NODE_ENV': 'dev'
},
watch: ['./src/server/'],
nodeArgs: ['--debug=5858']
};
return $.nodemon(nodeOptions);
});
function log(msg) {
if (typeof(msg) === 'object') {
for (var item in msg) {
if (msg.hasOwnProperty(item)) {
$.util.log($.util.colors.blue(msg[item]));
}
}
} else {
$.util.log($.util.colors.blue(msg));
}
}
module.exports = gulp;
{
"version": "1.0",
"configurations": [
{
"name": "Launch app.ts",
"type": "node",
"program": "src/server/app.ts",
"stopOnEntry": true,
"arguments": null,
"workingDirectory": ".",
"runtimeExecutable": null,
"env": { },
"sourceMaps": true
},
{
"name": "Attach",
"type": "node",
"address": "localhost",
"port": 5858,
"sourceMaps": true
},
{
"name": "Launch app.js",
"type": "node",
"program": "src/server/app.js",
"stopOnEntry": true,
"arguments": null,
"workingDirectory": ".",
"runtimeExecutable": null,
"env": { }
}
]
}
{
"version": "0.1.0",
"command": "gulp",
"isShellCommand": true,
"args": [
"--no-color"
],
"tasks": [
{
"taskName": "serve-dev-debug",
"args": [
"serve-dev",
"--debug"
],
"suppressTaskName": true,
"isWatching": false,
"problemMatcher": [
"$lessCompile",
"$tsc",
"$jshint-stylish"
]
},{
"taskName": "ts-compile",
"problemMatcher": "$tsc"
},{
"taskName": "ts-compile-client",
"problemMatcher": "$tsc"
},{
"taskName": "ts-compile-server",
"problemMatcher": "$tsc"
},{
"taskName": "test",
"args": [],
"isTestCommand": true
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment