Custom Build Script

Alchemy will look at theme/build.js for any custom build commands. They will not be run in watch mode, but will be run in build mode.

Your file must be named build.js and located in the theme folder. It must export a function called CustomBuild.

Alchemy will call it with a single parameter: an object containing all the variables from config.yaml and the generated filemap. We recommend console.loging the options variable so you can explore it.

Example

This is a dirt-simple boilerplate build.js file.

module.exports.CustomBuild = (o) => {
  console.log(o);
}