Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/itsthatguy/run-command

Run synchronous shell commands from within node
https://github.com/itsthatguy/run-command

Last synced: about 6 hours ago
JSON representation

Run synchronous shell commands from within node

Awesome Lists containing this project

README

        

# Run Commands

Run synchronous shell commands from within node

### Simple Example

```coffee
# postinstall.coffee

runCommand = require("run-command")

runCommand "bower", ['install'], ->
runCommand "gulp"
```

### Slightly more Advanced Example

```coffee
# 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

```coffee
runCommand.set('info', false) # turn off info messages
runCommand.set('warning', false) # turn off warning messages
runCommand.set('error', false) # turn off error messages
```