All Projects → yyx990803 → Shell Task

yyx990803 / Shell Task

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

Programming Languages

javascript
184084 projects - #8 most used programming language

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!')
        }
    })
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].