1.2.1 • Published 8 years ago

mkfile v1.2.1

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

mkfile NPM version NPM downloads Build Status XO code style

Task driven build tool.

Full-feature ES2015+ driven task runner.

Install

$ npm install -g mkfile

Usage

mkfile.js example:

export function clean() {
  // clean `build` directory
  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')
}
# run default task
$ mk
# run build
$ mk build

CLI

$ mk -h

  Task driven build tool.

  Usage:
    mk [taskName]

    -c/--config:     Use custom mkfile
    -l/--list:       List all task names
    -v/--version:    Print version
    -h/--help:       Print help

API

this

.run

Run a task by name.

global variables

  • cli CLI arguments parsed by meow, the object contains .input and .flags.
  • Built-in unix shell commands, see usage at shelljs.

License

MIT © EGOIST