-
-
Notifications
You must be signed in to change notification settings - Fork 0
How to Provide Configuration
The Exhibitor CLI allows you to customize the behavior of various commands, such as start and demo.
Configuration is provided via a file. Certain properties can be overridden by CLI command arguments.
File paths defined in a configuration file are relative to the path of the configuration file.
If difficulties are encountered whilst providing configuration for the Exhibitor CLI, try enabling verbose mode by adding the --verbose command argument. For example: npx exhibitor start --config="./exh.config.json" --verbose. This will print a detailed list of steps that Exhibitor CLI is performing.
See the Configuration Reference for what options exist.
Configuration can be defined as either a JSON, Javascript, or Typescript file.
Start by creating a configuration file of either type:
Defining configuration as JSON is optimal for simple uses of Exhibitor or if the extra capabilities that Javascript/Typescript provides is not required.
{
"$schema": "https://raw.githubusercontent.com/samhuk/exhibitor/master/src/common/config/schema.json",
"rootStyle": "./styles.scss",
"site": {
"port": 4002,
"title": "Test Component Library"
},
"verbose": true
}
module.exports = {
rootStyle: './styles.scss',
site: {
port: 4001,
title: 'My Component Library',
},
verbose: true,
}import { Config } from 'exhibitor'
const config: Config = {
rootStyle: './styles.scss',
site: {
port: 4001,
title: 'My Component Library',
},
verbose: true,
}
export default configYour configuration file can be supplied to the Exhibitor CLI like so:
npx exhibitor start --config="./exh.config.json"
npx exhibitor start -c "./exh.config.json"
npx exhibitor start -c "./exh.config.ts"
See the Configuration Reference for what configuration options exist.