CLI configuration file
The bojagi CLI supports config files for easier setup. It supports both JSON and js files and priorities in the following order:
- .bojagirc.js
- .bojagirc.json
- .bojagirc (also JSON formatted)
.bojagirc.js
file
Example Here's a .bojagirc.js
file example overwriting some of the defaults:
module.exports = {
storyPath: ['src/**/*.stories.@(tsx|ts|jsx|js)', 'src/**/*.bojagi.@(tsx|ts|jsx|js)'],
storyPathIgnorePatterns: ['src/**/*.ignore.stories.@(tsx|ts|jsx|js)']
}
Configuration options
storyPath
Dir to search components in. Can be a glob.
name | storyPath |
---|---|
type | string|array |
default | ['src/**/*.stories.@(tsx|ts|jsx|js)', 'src/**/*.bojagi.@(tsx|ts|jsx|js)'] |
storyPathIgnorePatterns
Files, that match storyPath but should be ignored regardless.
name | storyPathIgnorePatterns |
---|---|
type | string|array |
default | [] |
decoratorPath
Path to search for the optional decorator file.
name | decoratorPath |
---|---|
type | string |
default | .bojagi/decorator.js |
webpackConfig
Path to your webpack config file. If not set, auto detects if create-react-app is used and uses it's webpack config. Defaults to webpack.config.js
otherwise.
name | webpackConfig |
---|---|
type | string |
default | create-react-app's config or webpack.config.js |
executionPath
Path to execute the command in.
name | executionPath |
---|---|
type | string |
default | current working directory |