gulp-nodemon
gulp-nodemon copied to clipboard
gulp-nodemon passing node cli arguments in quotes
Hi,
I'm having troubles passing cli arguments to through gulp-nodemon to node.
I would like to pass the filters
argument and get the following when nodemon runs node tmp/ --filters test
.
But I'm getting the filters
in quotes (node tmp/ "--filters test"
) for the following task
gulp.task('nodemon', function () {
return nodemon({
script: 'src/',
watch: ['src/**/*.js'],
ext: 'js',
args: ['--filters test']
})
})
gulp log:
[14:57:40] [nodemon] 1.11.0
[14:57:40] [nodemon] to restart at any time, enter `rs`
[14:57:40] [nodemon] watching: src/**/*.js
[14:57:40] [nodemon] starting `node src/ "--filters test"`
The node code can't handle the quotes and just passes over the arguments. Any ideas ?
Thanks.
Hi, try to put one args by item in args array.
gulp.task('nodemon', function () {
return nodemon({
script: 'src/',
watch: ['src/**/*.js'],
ext: 'js',
args: ['--filters', 'test']
})
})