0.1.1 • Published 9 years ago

broccoli-lodash v0.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

broccoli-lodash

The broccoli-lodash plugin renders lodash templates.

This plugin is designed to compile a single, primary input file into a single output file.

Installation

npm install --save-dev broccoli-lodash

Usage

var renderLodashTemplate = require('broccoli-lodash');

var outputTree = renderLodashTemplate(sourceTrees, options)
  • inputTree: A tree to search for files.

  • options.files: An array of blob patterns to match templates.

  • options.context: A context used to render each template.

Output files are named the same as inputs, but with the extension removed, i.e.

  • index.html.templateindex.html
  • index.templateindex
  • indexindex

Example

var lodash = require("broccoli-lodash");
// Write index.html
var index = lodash("src", {
  files: ["index.html.template"],
  context: {
    env: "production",
    version: "0.1.0"
  }
});