Skip to content

Releases: cacjs/cac

v6.0.1

25 Nov 15:12
Compare
Choose a tag to compare

6.0.1 (2018-11-25)

Bug Fixes

v6.0.0

25 Nov 14:31
Compare
Choose a tag to compare

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.