2.1.1 • Published 5 years ago

@caviar/cli v2.1.1

Weekly downloads
117
License
MIT
Repository
github
Last release
5 years ago

Build Status Coverage

@caviar/cli

Caviar cli tool

Install

$ npm i -g @caviar/cli

Usage

> caviar --preset /path/to/preset.js --configFile /path/to/config.js

CLI options

Optionsrequireddefault valuetypedescription
--cwdNOprocess.cwd()pathspecify the working directory
--dev, --no-devNOfalsebooleanwhether in dev mode
--sandbox, --no-sandboxNOfalsebooleanwhether use sandbox or not
--phaseNO'default'stringwhat kind of phase should caviar run as
--presetDepends-paththe javascript file path of the caviar preset
--configFileDepends-paththe 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)

> caviar

For details,

> caviar --help

Create 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()

License

MIT

2.1.1

5 years ago

2.1.0

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

0.0.1

5 years ago