Socket
Socket
Sign inDemoInstall

nodemon

Package Overview
Dependencies
Maintainers
0
Versions
254
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodemon - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0

24

nodemon.js

@@ -26,3 +26,9 @@ #!/usr/bin/env node

sys.log('\x1B[32m[nodemon] starting node\x1B[0m');
node = spawn('node', nodeArgs);
var ext = path.extname(app);
if (ext === '.coffee') {
node = spawn('coffee', nodeArgs);
} else {
node = spawn('node', nodeArgs);
}

@@ -118,3 +124,16 @@ node.stdout.on('data', function (data) {

if (!nodeArgs.length || nodeArgs[0] == 'help') {
if (!nodeArgs.length) {
// try to get the app from the package.json
// doing a try/catch because we can't use the path.exist callback pattern
// or we could, but the code would get messy, so this will do exactly
// what we're after - if the file doesn't exist, it'll throw.
try {
app = JSON.parse(fs.readFileSync('./package.json').toString()).main;
nodeArgs.push(app);
} catch (e) {
nodeArgs.push('help'); // default to help
}
}
if (nodeArgs[0] == 'help') {
usage();

@@ -134,3 +153,2 @@ process.exit(0);

sys.log('[nodemon] v' + meta.version);

@@ -137,0 +155,0 @@

4

package.json

@@ -9,7 +9,7 @@ {

"bin": { "nodemon" : "./nodemon.js" },
"repository": { "type" : "git", "url" : "http://github.com/remy/nodemon.git" },
"repository": { "type" : "git", "url" : "http://github.com/remy/nodemon.git" },
"description": "Simple monitor script for use during development of a node.js app.",
"keywords": ["monitor", "development", "restart", "autoload", "reload", "terminal"],
"version": "0.2.2",
"version": "0.3.0",
"main": "./nodemon"
}

@@ -22,3 +22,3 @@ # nodemon

nodemon [your node app]
For example, if my application accepted a host and port as the arguments, I would start it as so:

@@ -30,2 +30,8 @@

`nodemon` also supports running and monitoring [coffee-script](http://jashkenas.github.com/coffee-script/) apps:
nodemon server.coffee
If no script is given, `nodemon` will test for a `package.json` file and if found, will run the file associated with the *main* property ([ref](https://github.com/remy/nodemon/issues/14)).
# Ignoring files

@@ -32,0 +38,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc