run-command
v1.0.2
Published
daisy chain running shell commands
Downloads
5
Readme
Run Commands
Run synchronous shell commands from within node
Simple Example
# postinstall.coffee
runCommand = require("run-command")
runCommand "bower", ['install'], ->
runCommand "gulp"
Slightly more Advanced Example
# start.coffee
runCommand = require("run-command")
console.log(">> NODE_ENV: " + process.env.NODE_ENV)
runCommand("coffee", ['app.coffee'])
if (process.env.NODE_ENV == "development")
runCommand "gulp", ['watch-pre-tasks'], ->
runCommand("gulp", ['watch'])
Configuration
runCommand.set('info', false) # turn off info messages
runCommand.set('warning', false) # turn off warning messages
runCommand.set('error', false) # turn off error messages