Config Options
Our configurable options
simplify CLI configuration, making it easier and more efficient.
cssPreprocessor
Takes
string
value to specify the preprocessor for the component to be generated which includescss
,pcss
,scss
, etc.Note:
css
is the default value forcssPreprocessor
.usesTypeScript
Takes
boolean
value to specify whether to useTypeScript
as template for the component or not.Note:
true
is the default value forusesTypeScript
.scopeStyle
Takes
boolean
value to specify whether to use scoped css modules for the component or not.Note:
false
is the default value forscopeStyle
.addStory
Takes
boolean
value to specify whether to addstorybook
stories for the component or not.Note:
false
is the default value foraddStory
.addIndex
Takes
boolean
value to specify whether to add index file for the component or not.Note:
false
is the default value foraddIndex
.addTest
Takes
boolean
value to specify whether to add test file for the component or not.Note:
false
is the default value foraddTest
.flat
Takes
boolean
value to specify whether to generate component without parent folder or not.Note:
false
is the default value forflat
.path
Takes
string
value to specify the path to where the component should be generated.Note:
./
is the default value forpath
.cautionOnly relative path is accepted by the
path
option. So using absolute path may lead to an unexpected error.customTemplate
Takes an object structure with valid properties like
component
,style
,story
andtest
that allows user to provide their own custom templates for the component they want to generate more.
Override the options for generating a certain component
You can override
the options in arclix.config.json
, if you want some options
needed only for generating a certain component by adding the flags.
For example: If you want Contact
to go in pages
folder but you have configured path
in config file to ./src/components
then you can use --path or -p
flag to override
the path
temporarily only for that component.
npx arclix g c Contact --path="./src/pages"