run-command

1.0.2 • Public • Published

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 

Readme

Keywords

none

Package Sidebar

Install

npm i run-command

Weekly Downloads

24

Version

1.0.2

License

MIT

Last publish

Collaborators

  • itg