Skip to content
Branch: master
Go to file
Code

Latest commit

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

mimosa-twig

Overview

This is a Twig compiler for the Mimosa build tool. It will pre-compile your twig templates for use in the browser.

Some useful links for more information on this module:

Usage

Add 'twig' to your list of modules. That's all! Mimosa will install the module for you when you start mimosa watch or mimosa build.

Functionality

This module will compile Twig files during mimosa watch and mimosa build. This module utilizes all of the built-in template behavior that comes with Mimosa's basic template compiler. See the mimosa website for more information about how templates are treated or check out the various template configuration options.

Default Config

twig: {
  lib: undefined
  extensions: [ "twig", "twg" ]
  options: {
    debug: false,
    trace: false
  }
}

lib require'd compiler library

You may want to use this module but may not be ready to use the latest version of Twig. Using the lib property you can provide a specific version of Twig if the one being used by this module isn't to your liking. To provide a specific version, you must have it npm installed into your project and then provide it to lib. For instance: lib: require('twig').

extensions an array of strings

The extensions of your Twig files.

options object

Pass-through compiler options to the compiler library

debug, trace, booleans

Debug flags for twig compiler

About

Mimosa template compiler module for the Twig templating language

Resources

You can’t perform that action at this time.