Question

I tried to set nodemon -L (--legacy-watch) option as a nodemon config for gulp-nodemon as adding it with null string value in the following but it did not work. Can anyone help?

    gulp.task('server', function () {
            nodemon({
            script: 'server.js',
            watch: paths.server,
            env: { 'NODE_ENV': 'development' },
            'legacy-watch': ''
        }).on('restart', 'lint');
    });
Était-ce utile?

La solution

You do:

legacyWatch: true

All options with a dash are referred to with camelcase when being required.

Autres conseils

Actually this is documented on nodemon's github page:

https://github.com/remy/nodemon/blob/master/doc/sample-nodemon.md

You would do something like this...

nodemon({
    script: "server.js",
    execMap: {
        js: "node --harmony"
    }
}).on("restart", function() {
    console.log("restarted!");
});

Hope this helps.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top