smart-restart
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -39,3 +39,3 @@ #!/usr/bin/env node | ||
) | ||
const { killSignal } = options | ||
const { killSignal, onChildSpawned } = options | ||
if (!options.main) throw new Error('missing main') | ||
@@ -139,2 +139,4 @@ const initial = path.resolve(options.main) | ||
}) | ||
if (onChildSpawned) onChildSpawned(child) | ||
} | ||
@@ -141,0 +143,0 @@ restart() |
{ | ||
"name": "smart-restart", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "Like nodemon but only watches require()d files. Like piping but easy to use with node-inspector.", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -34,2 +34,3 @@ # smart-restart | ||
spawnOptions: {...}, // optional, options for `spawn` | ||
onChildSpawned: child => {}, // optional, callback to receive ChildProcess instance | ||
ignore: /(\/\.|~$)/, // optional, ignore pattern for `chokidar` (default: /(\/\.|~$)/) | ||
@@ -36,0 +37,0 @@ usePolling: false, // optional, whether to use polling in `chokidar` (default: false) |
290931
206
51