Template Language and PatternEngines

By default Pattern Lab uses the Mustache template language, extended with pattern parameters. PatternEngines let you add support for a template language of your personal choice. Each PatternEngine has it's own set of features and caveats.

Right now the most mature PatternEngines are Handlebars, Mustache and Twig.

Official PatternEngines for Nodepermalink

Install and Configure a PatternEnginepermalink

  1. Install a new PatternEngine that you wish to use. For example, to install the Handlebars engine, run npm install --save @pattern-lab/engine-handlebars.
  2. (Optional) Change the "patternExtension" property of your config. This sets the panel name and language for the code tab on the styleguide.

You'll need to restart Pattern Lab for changes to take effect. Some PatternEngines may provide further configuration.