Releases: cacjs/cac
Releases · cacjs/cac
v6.0.1
v6.0.0
Many breaking changes, so it's a new major release. But you don't need to upgrade to v6 if it's unnecessary for you :P
New Features
Support brackets in arguments
i.e. it works like commander.js now:
const cli = require('cac')()
cli.command('build <entry> [...more]')
.option('--target [target]', 'Build target', { default: 'web' })
.action((entry, more, options) => {
console.log(entry, more, options)
})
cli.parse()
Options now can be used before command
node cli.js build --minimize
# equals to
node cli.js --minimize build
Smaller size
13kB in total, compiled file is about 400 SLOC, only one single tiny dependency.
More
Check out README
Notable Breaking Changes
- Unknown options are not allowed by default.
--help
and--version
are not added by default.