close

Filter

loading table of contents...

Frontend Developer Manual / Version 2107

Table Of Contents

5.1 Creating a New Theme

The CoreMedia Frontend Workspace provides a script to easily create a new minimum theme skeleton, including brick configuration and theme inheritance. It works on macOS, Windows, and Linux.

Quick Overview
yarn install
yarn run create-theme <name>
yarn install
cd themes/<name>-theme
Installation

After running yarn install the script is ready to be used like all provided scripts.

You’ll need to have Node = 14.x on your machine. You can use nvm to easily switch Node versions between different projects.

This tool does not need a Node backend. The Node installation is only required for tooling.

Usage

To create a new theme, run (replace <name> with a name according to the rules below):

yarn run create-theme <name>
yarn install
cd themes/<name>-theme

It will create a directory with the pattern <name>-theme inside the themes folder, after asking for some configuration.

The tool lets you decide which bricks you want to include into your dependencies when creating the theme and asks if you want to keep the unused bricks as commented out dependencies in your newly created theme. It also allows you to select an existing theme as the parent of the new one. Learn more about how to extend themes in Section 5.5, “Theme Inheritance”.

Inside that directory, it will generate the initial theme structure as described in Section 4.2, “Theme Structure”.

You´ll need to run yarn install from the root of the frontend workspace to install the dependencies of the new theme before the theme can be used.

Note

Note

The theme name should be a simple ASCII name. Whitespace and special characters are stripped and the name will be lowercase.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.