Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gulp-nodemon passing node cli arguments in quotes #141

Open
dannyhuly opened this issue May 24, 2017 · 1 comment
Open

gulp-nodemon passing node cli arguments in quotes #141

dannyhuly opened this issue May 24, 2017 · 1 comment

Comments

@dannyhuly
Copy link

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.

@MaximeMaillet
Copy link

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']
    })
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants