Grunt Handlebars precompiler plugin in pure JS
JavaScript
Switch branches/tags
Nothing to show
Latest commit f66d7ec Jan 4, 2013 @gyllstromk updated doc
Permalink
Failed to load latest commit information.
bin
tasks
test
LICENSE-MIT
README.md
grunt.js
package.json

README.md

grunt-emberify: Precompile your Ember Handlebars and assign to Ember.TEMPLATES

Precompile handlebars templates to a single JS file where templates are saved to Ember.TEMPLATES.

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with:

npm install grunt-emberify

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

Usage:

  grunt.initConfig({
      handlebars_embed: {

      // includes templates as:
      // Ember.TEMPLATES[<name>] = Ember.Handlebars.compile(<template content>);

          'allMyTemplates.js': [ 'client/lib/**.handlebars' ]
      },

      /* ... OR ... */

      handlebars_precompile: {

      // Compiles templates.
      // Includes as:
      // Ember.TEMPLATES[<name>] = Ember.Handlebars.template(<compiled content>);

          'allMyTemplates.js': [ 'client/lib/**.handlebars' ]
      },

      /* ... */

  });

  grunt.loadNpmTasks('grunt-emberify');

License

Copyright (c) 2012 Karl Gyllstrom
Licensed under the MIT license.