node-make
Version:
Task driven build tool.
63 lines (42 loc) • 1.33 kB
Markdown
> Task driven build tool.
Full-feature ES2015+ driven task runner.
```bash
$ npm install -g node-make
```
**makefile.js** example:
```js
export function clean() {
// clean `build` directory
this.fs.delete('./build')
// or rm('-rf', './build')
}
export function build() {
this.run('clean')
// run webpack
exec('./node_modules/.bin/webpack -p')
}
export default function() {
console.log('This is the default task!')
// call task manually
this.run('build')
}
```
```bash
$ mk
$ mk build
```
CLI arguments parsed by [meow](https://github.com/sindresorhus/meow), the object contains `.input` and `.flags`.
Built-in `fs` helpers, see usage at [mem-fs-editor](https://github.com/SBoudrias/mem-fs-editor).
Built-in `unix shell` commands, see usage at [shelljs](https://github.com/shelljs/shelljs).
MIT © [EGOIST](https://github.com/egoist)