An npm module for using ember-template-compiler with Grunt
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
tasks
LICENSE
README.md
package.json

README.md

grunt-ember-template-compiler

Getting Started

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-ember-template-compiler --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-ember-template-compiler');

Usage Example:

emberhandlebars: {
  compile: {
    options: {
      templateName: function(sourceFile){
        return sourceFile.replace('src/templates/', '').replace('.handlebars', '');
      }
    },
    files: [
      'src/templates/*.handlebars'
    ],
    dest: 'src/templates.js'
  }
}

MultiTask Usage Example:

emberhandlebars: {
  task_one: {
    options: {
      templateName: function(sourceFile) {
        return sourceFile.replace('src/one/templates/', '').replace('.handlebars', '');
      }
    },
    files: [
      'src/one/templates/*.handlebars'
    ],
    dest: 'src/one/templates.js'
  },
  task_two: {
    options: {
      templateName: function(sourceFile) {
        return sourceFile.replace('src/two/templates/', '').replace('.handlebars', '');
      }
    },
    files: [
      'src/two/templates/*.handlebars'
    ],
    dest: 'src/two/templates.js'
  }
}