scripy
Run in child process.
Last updated 4 years ago by rem .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install scripy 
SYNC missed versions from official npm registry.

scripy NPM version NPM downloads Build Status

Run scripts in child process.

preview

Install

$ npm install --save scripy

Usage

const scripy = require('scripy')

const build = scripy('npm run build')
const start = scripy('npm start')

// if you want to kill each other
build.on('close', () => start.kill())
start.on('close', () => build.kill())

API

scripy(command, [options])

command

Type: string

The command to excute, it's passed as args to child_process.spawn.

options

displayName

Type: string

The name to display while loggin messages into the console, default is the parsed script name from command. eg: npm run build's scriptName and displayName both are npm.

scripy.sync(command, [options])

Same as scripy() but using spawn.sync.

License

MIT © EGOIST

Current Tags

  • 0.3.0                                ...           latest (4 years ago)

5 Versions

  • 0.3.0                                ...           4 years ago
  • 0.2.2                                ...           4 years ago
  • 0.2.1                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |