Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/paulmillr/tag-shell
Use ES6 template tags for your node.js shell commands.
https://github.com/paulmillr/tag-shell
Last synced: 3 months ago
JSON representation
Use ES6 template tags for your node.js shell commands.
- Host: GitHub
- URL: https://github.com/paulmillr/tag-shell
- Owner: paulmillr
- Created: 2017-01-26T23:44:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-11T23:07:46.000Z (almost 8 years ago)
- Last Synced: 2024-05-08T17:02:20.631Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 16
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tag-shell
Use ES6 template tags for your node.js shell commands.
Using *backticks* is important and the package won't work otherwise.
```javascript
const sh = require('tag-shell');
const opts = {app: 'App', icon: 'icon.png'};// Async.
sh.async`notify-send -a ${opts.app}
-i ${opts.icon}
`;// Streaming.
sh.spawn`node -v`.stdout.on('data', data => console.log(data.toString()))// Sync.
const version = sh`node -v`;
```## License
MIT