diff --git a/bin/nodemon.js b/bin/nodemon.js index 4676707f..31aff345 100755 --- a/bin/nodemon.js +++ b/bin/nodemon.js @@ -1,16 +1,16 @@ #!/usr/bin/env node -'use strict'; -var cli = require('../lib/cli'); -var nodemon = require('../lib/'); -var options = cli.parse(process.argv); + +const cli = require('../lib/cli'); +const nodemon = require('../lib/'); +const options = cli.parse(process.argv); nodemon(options); -var fs = require('fs'); +const fs = require('fs'); // checks for available update and returns an instance -var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); +const pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json')); -if (pkg.version.indexOf('0.0.0') !== 0) { +if (pkg.version.indexOf('0.0.0') !== 0 && options.noUpdateNotifier !== true) { require('update-notifier')({ pkg }).notify(); } diff --git a/lib/cli/parse.js b/lib/cli/parse.js index 789fe6ea..4c0fa8fc 100644 --- a/lib/cli/parse.js +++ b/lib/cli/parse.js @@ -113,6 +113,11 @@ function nodemonOption(options, arg, eatNext) { options.version = true; } else + if (arg === '--no-update-notifier') { + options.noUpdateNotifier = true; + } else + + if (arg === '--dump') { options.dump = true; } else