soy-grunt-task
Grunt task to compile Soy / Closure Templates
Getting Started
Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-soy
Then add this line to your project's grunt.js
gruntfile:
grunt;
Configure the soy task in your initConfig call (everything is optional, these are the defaults):
grunt;
- src : an array of glob patterns for finding input files. matches standard GruntMultiTask syntax.
- inputPrefix : your src patterns will be resolved against this. It will also be passed to the compiler such that the {INPUT_DIRECTORY} format variable is relative to inputPrefix
- All other options are passed directly to the compiler - use [Closure Template docs][https://developers.google.com/closure/templates/docs/javascript_usage#compilation] and the jsSrcCompiler's help text as a reference for these options.
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.
Release History
0.2.0 - basic support - src, inputPrefix, and outputPathPrefix 0.3.0 - supports all compiler flags.
Roadmap
- Include MsgExtractor support? Might be conflating two different tools...
- Separate SoyToJsSrcCompiler.jar to reduce package size? Worth the added complexity to use grunt-soy?
License
Copyright (c) 2012 Adam Ahmed
Licensed under the MIT license.