Skip to content

Grunt plugin for SOYs (Google Closure) template generator

Notifications You must be signed in to change notification settings

skhilko/grunt-closure-soy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grunt plugin for converting SOY templates into Javascript, using closure-templates.

Getting Started

Install this grunt plugin next to your project's [grunt.js gruntfile][getting_started] with: npm install grunt-closure-soy

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-closure-soy');

Then specify what files to compress in your config:

  grunt.initConfig({
    closureSoys: {
      all: {
        /** @required  - string including grunt glob variables*/
        src: './static/template/**/*.soy',
        /** @required  - string including grunt glob variables*/
        soyToJsJarPath: './closure-library/template/SoyToJsSrcCompiler.jar',
        /** @optional  - defaults to '{INPUT_DIRECTORY}/{INPUT_FILE_NAME}.js' */
        outputPathFormat: '{INPUT_DIRECTORY}/{INPUT_FILE_NAME}.js'
        /** any other parameter included on the options will be added to call */
        options: {
          shouldGenerateJsdoc: true,
        	shouldProvideRequireSoyNamespaces: true
        }
      }
    }
  });

Release History

  • 0.1.1 Missing async callback
  • 0.1.0 Initial Release

About

Grunt plugin for SOYs (Google Closure) template generator

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%