Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isruslan/shellby
Simple way to run series shell commands from node.js/io.js.
https://github.com/isruslan/shellby
javascript shell
Last synced: 3 months ago
JSON representation
Simple way to run series shell commands from node.js/io.js.
- Host: GitHub
- URL: https://github.com/isruslan/shellby
- Owner: isRuslan
- Created: 2014-06-11T20:43:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-25T16:16:00.000Z (almost 10 years ago)
- Last Synced: 2024-10-20T18:31:42.488Z (3 months ago)
- Topics: javascript, shell
- Language: JavaScript
- Homepage:
- Size: 270 KB
- Stars: 28
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# shellby [![Build Status](https://secure.travis-ci.org/isRuslan/shellby.png?branch=master)](http://travis-ci.org/isRuslan/shellby)
> Run single/series shell commands from node.js.
## Install
```sh
$ npm install shellby --save
```## Usage
```javascript
var shellby = require('shellby');shellby.exec('mkdir hello', function (err) {
console.log('dir created');
});shellby.series(['git pull', 'npm i'], function (err) {
console.log('done');
});
```## Options
You can specify an options object for each command. See [NodeJS documentation on `spawn`](https://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options) for what options are supported. If no options are specified, they default to `{stdio: inherit}`.
```javascript
var shellby = require('shellby');shellby.exec('make', {env: {DEBUG: true}}, function (err) {
console.log('make run');
});shellby.series([
'git clone https://github.com/foo/bar.git',
['npm i', {cwd: 'bar'}]
], function (err) {
console.log('done');
});
```## Test
```sh
npm test
```## Credits
You can can run series shell commands due to this people:
NameGitHub
Ruslan Ismagilov@isRuslan
Jan Bölsche@regular## License
Copyright (c) 2014 Ruslan Ismagilov. Licensed under the MIT license.