mirror of
https://github.com/SrIzan10/nodemon.git
synced 2026-05-01 10:55:09 +00:00
refactor: indexOf > includes (in node4)
This commit is contained in:
@@ -80,6 +80,10 @@ config.load = function (settings, ready) {
|
||||
bus.emit('config:update', config);
|
||||
pinVersion().then(function () {
|
||||
ready(config);
|
||||
}).catch(e => {
|
||||
// this doesn't help testing, but does give exposure on syntax errors
|
||||
console.error(e.stack);
|
||||
throw e;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -102,7 +102,6 @@ function run(options) {
|
||||
debug(spawnArgs);
|
||||
}
|
||||
|
||||
|
||||
if (config.required) {
|
||||
var emit = {
|
||||
stdout: function (data) {
|
||||
@@ -264,7 +263,7 @@ function run(options) {
|
||||
|
||||
// swallow the stdin error if it happens
|
||||
// ref: https://github.com/remy/nodemon/issues/1195
|
||||
child.stdin.on('error', () => {});
|
||||
child.stdin.on('error', () => { });
|
||||
process.stdin.pipe(child.stdin);
|
||||
|
||||
bus.once('exit', function () {
|
||||
|
||||
@@ -158,7 +158,7 @@ function nodemon(settings) {
|
||||
rule = rule.slice(1);
|
||||
|
||||
// don't notify of default ignores
|
||||
if (defaults.ignoreRoot.includes(rule)) {
|
||||
if (defaults.ignoreRoot.indexOf(rule) !== -1) {
|
||||
return false;
|
||||
return rule.slice(3).slice(0, -3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user