Socket
Book a DemoInstallSign in
Socket

shell-task

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shell-task

Proof-of-concept then-able shell commands in node.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

shell-task

Proof-of-concept then-able shell commands in node. (Although it looks like a promise, it is NOT)

Install

$ npm install shell-task

Usage

var Task = require('shell-task')

new Task('git init')
    .then('sleep 1000')
    .then('git add .')
    .then(function (next) {
        // you can mix JavaScript functions in between...
        console.log('doing something...')
        setTimeout(next, 1000)
    })
    .then('git commit -m "testing this cool stuff"')
    .then('git remote add ...')
    .then('git push -u origin master')
    .run(function (err, next) {
        // this entire callback is optional.
        if (err) {
            // you can ignore the exception
            // and just call next(), which will
            // continue the flow
        } else {
            console.log('done!')
        }
    })

Keywords

shell

FAQs

Package last updated on 07 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts