Building a theme
To build a theme:
-
Change to the theme directory you cloned from github.
showLineNumbers {1,4}1.2├── README.md3├── _build/4│ └── brightspot-theme-frost-x.x.x-SNAPSHOT.zip5├── babel.config.js6├── com/7├── etc/8├── gulpfile.js9├── node_modules/10├── package.json11├── postcss.config.js12├── styleguide/13├── webpack.*.js14└── yarn.lock- 1. Directory from which you run the build or start the server.
- 4. Built theme.
-
Ensure you have version 12 or later of node installed:
nvm ls. Install version 12 or later if necessary from nodejs.org. -
Use a version 12 or later release of node:
nvm use xx.x.x(use the version you discovered in step 2). -
If you want to build the theme and run the Styleguide server, run
yarn server:styleguide. -
If you want to build the theme without running the Styleguide server—
- For the first build, run
yarn cache clean && yarn && yarn format && yarn build. - For subsequent builds, run
yarn build.
- For the first build, run
The build job creates and zips the theme in the directory build/ (see previous illustration). You can apply the built theme to a site; for details, see Changing a site's theme.