node-shell-runner

0.0.2 • Public • Published

node-shell-runner

Requires child_process.execSync.

Usage

var runner = require('node-shell-runner');
 
runner.run([
    ['cp app build', 'Copying to build dir'],
    ['watch build bin/rerun', 'Starting build watcher', { async : true }]
]);

Require in npm and pass an array of commands to .run.

Each command is an array. The first item is the command, the second items is a descriptions, the optional third item is the options object for the command.

An additional option that is interpreted before being bassed to node is whether the command should be run in the bacgkround using child_process.spawn. If async is truthy, it will.

Async commands will be split on spaces and put into and array. If this will break your command, make the command an array or put the command in a separate bin instead:

var runner = require('node-shell-runner');
 
runner.run([
    [
        ['watch', '"bin/util/sass output"', 'app/styles', 'app/views'],
        'Starting sass watcher',
        { async : true }
    ]
]);

Readme

Keywords

none

Package Sidebar

Install

npm i node-shell-runner

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • pajtai