Configuring a theme
Configuration files define properties which impact the way a theme interacts with Brightspot and Styleguide. Configurations may impact the behavior of your theme during development or at run time.
Configuration files may be defined at the root of your styleguide/
directory or in a subdirectory. When placed in a subdirectory it is a best practice to keep your configuration local to the components in the same directory. If you accidentally define a configuration for a component outside of the same directory, Styleguide will try to warn you.
The global configuration is located at the root of your styleguide/
directory:
.
├── package.json
└── styleguide/
├── _config.json
├── component_directory_1/
└── component_directory_2/
-
Required
-
Global configuration
If you’d like to separate your configuration into component-specific configuration files, you can add includes
to your global _config.json
and use glob syntax:
{
"includes": [
"**/*.config.json"
]
}
Now you are able to define additional configuration files in the following manner:
.
├── package.json
└── styleguide/
├── _config.json
└── component/
├── Component.hbs
└── _Component.config.json
-
Required
-
Global configuration
-
Component configuration
See also: