Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

liquid-build

The script/ directory contains the following scripts:

  • render.js, which renders .liquid template files using LiquidJS
  • package.js, which packages static files and rendered templates into ZIP archives

Place templates to be rendered and static files to be packaged in the corresponding directory:

  • shared/_global/, for templates/files shared between all builds
  • shared/<group>/, for templates/files shared by builds in group <group>
  • build/<build>/, for templates/files specific to build <build>

Any files ending in .liquid will be rendered as templates, and any other files will be treated as static. When packaging builds, rendered templates overwrite static files; however, static files can be renamed with .liquid to exempt them from this behavior.

The scripts are configured using JSON files the config/ directory:

  • global.json, which stores shared variables for all builds
  • shared.json, which stores shared variables for build groups
  • builds.json, which lists the builds and stores build-specific variables

Template context is applied from the top-down, so later configurations overwrite variables of earlier configurations as follows:

  1. global.json (LOWEST)
  2. shared.json (from first-to-last as set in builds.json)
  3. builds.json(HIGHEST)

Additionally, _build is a special variable set by the script which contains the build key from builds.json. Avoid naming variables _build in config files, as the build key will take precedence.

About

Renders Liquid templates and packages them alongside static files, with stacking for global, grouped, and build-specific config, templates, and files.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages