Config file
Learn more about the CLI configuration and their use cases.
The config file enables you to customize the scanning process. You can define include
and ignore
properties to designate which directories to scan and utilize exports
and aliases
properties to let the CLI resolve the correct entry points and recognize the aliases to ensure data accuracy.
Locating the config file
The configuration file for the CLI can be placed in the following locations:
An
omlet
property in thepackage.json
file.An
.omletrc
file in JSON or YAML format in the root directory of your repositoryAn
.omletrc.json
,.omletrc.yaml
,.omletrc.yml
, or.omletrc.js
file in the root directory of your repository
Alternatively, you can also specify a custom configuration file name and location using the --config
option in the CLI command:
Auto-completion and error highlighting are available for the CLI configuration in popular IDEs like JetBrains and VS Code. Make sure to add Omlet's schema to your config file and have the CLI version 1.7.0 or above.
Properties
The configuration file can include the following properties:
include
, ignore
, and tsconfigPath
properties can be set using either command-line arguments or the configuration file. If a property is provided as a command-line argument, the corresponding value in the configuration file will be ignored. A default value will be used if a property is not set via the configuration file or command-line argument.
Next steps
Below are the docs explaining the most common use cases for the config file.
Issues with your component data?
If you think your component data in Omlet is inaccurate or if you see data issues on the Web app, you might need to set exports
and/or aliases
. Learn more here.
Last updated