const Bundl = require('bundl');Get any of the arguments passed from command line.
$ node mybundl.js --flag --other=stuff
Bundl.cliArgs.flag // true
Bundl.cliArgs.other // "stuff"Load all matched scripts.
Bundl.load('./build/*');List all named tasks that have been defined.
Bundl.listTasks(); // { taskOne: [Function], taskTwo: [Function] }Run a named task. Chain a series of tasks using then.
Bundl.runTask('build').then('test');Define tasks to be run. A task must return true or call done when it is complete. If hideFromSummary is true the task will be omitted from the summary table when --verbose is used.
const hideFromSummary = true;
Bundl.task('test:unit', function (done) {
// do unit tests
done();
}, hideFromSummary);
Bundl.run('test:unit');Execute shell commands from within your scripts. See execa for advanced usage options.
Bundl.shell('ls', ['-l']);Monitor files and fire a callback when files have changed. This is a convenience wrapper for node-watch
Bundl.watch(path, onChange, filter)