Support and Documentation

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 1 └── styleguide/ ├── _config.json 2 ├── component_directory_1/ └── component_directory_2/

1

Required.

2

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 like so:

. ├── package.json 1 └── styleguide/ ├── _config.json 2 └── component/ ├── Component.hbs └── _Component.config.json 3

1

Required.

2

Global configuration.

3

Component configuration.