@caviar/cli
v2.1.1
Published
Caviar cli tool
Readme
@caviar/cli
Caviar cli tool
Install
$ npm i -g @caviar/cliUsage
> caviar --preset /path/to/preset.js --configFile /path/to/config.jsCLI options
Options | required | default value | type | description
---- | ---- | ---- | ---- | ----
--cwd | NO | process.cwd() | path | specify the working directory
--dev, --no-dev | NO | false | boolean | whether in dev mode
--sandbox, --no-sandbox | NO | false | boolean | whether use sandbox or not
--phase | NO | 'default' | string | what kind of phase should caviar run as
--preset | Depends | - | path | the javascript file path of the caviar preset
--configFile | Depends | - | path | the javascript file path of the caviar config
At least one of preset and configFile should be specified.
Use caviar.config.js to simply the cli options
If a --caviar.config option has been specified,
caviar.config.js
module.exports = {
preset: '@my/caviar-layer',
configFile: require.resolve('./config')
}argv options > phase options (caviar.config) > profile options (caviar.config)
> caviarFor details,
> caviar --helpCreate your own caviar cli with default profile settings
bin.js
#!/usr/bin/env node
const {Command} = require('@caviar/cli')
new Command({
defaultCaviarConfig: '/path/to/default/caviar.config.js'
}).start()