1.0.0 • Published 9 years ago
@spicy/system v1.0.0
System
system(1) is a tiny wrapper around the child_process module. It uses child_process.spawn(2) to asynchronously run a shell command in a new process. It returns a Promise so that it can be async/await'd.
Installation
Usage
import system from '@spicy/system'
system('docker build .')
.then(() => console.log('Build done!'))
.catch(() => console.error('Build failed'))Or with async/await
import system from '@spicy/system'
async function main() {
try {
console.log('Starting Docker build...')
await system('docker build .')
console.log('Finished Docker build!')
} catch(e) {
/* Handle the exception */
}
}
main().then(/* */).catch(/* */)Contributing
Open an issue or submit a PR.
1.0.0
9 years ago