broccoli-soy
v0.1.0
Published
Soy / Closure Templates plugin for Broccoli
Downloads
3
Maintainers
Readme
broccoli-soy
The broccoli-soy compiles Soy / Closure Templates to JavaScript.
This plugin is designed to compile 1:1, primary input file into a single output file, however it supports glob patterns to target multiple files easily.
Installation
npm install --save-dev broccoli-soy
Usage
var soy = require('broccoli-soy');
var outputTree = soy(sourceTree, options);
sourceTree
: A tree that act as the search path foroptions.files
.options.compiler
: Path toSoyToJsSrcCompiler.jar
.options.files
: Array of node glob patterns to search for files.options.options
: (optional) A hash of options forSoyToJsSrcCompiler.jar
.
Example
var templates = soy("src", {
files: ["**/*.soy"],
compiler: path.resolve(__dirname, "lib/closure-templates-for-javascript-latest/SoyToJsSrcCompiler.jar")
});