grunt-we-ember-template

0.0.3 • Public • Published

grunt-we-ember-template

An npm module for preprocess We.js templates and override templates if exists in we.js active theme folder

A fork from 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-we-ember-template --save-dev

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

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

Usage Example:

emberhandlebars: {
  compile: {
    options: {
      templateName: function(sourceFile){
        var newSource = sourcefile.replace('src/templates/');
        return newSource.replace('.handlebars');
      },
      // theme folder used to override templates
      // default to node_modules/we-theme-default/templates/ember/
      themeTemplatesFolder: 'node_modules/we-theme-default/templates/ember/'
    },
    // local templates
    files: [
      'src/templates/*.handlebars'
    ],
    dest: 'src/templates.js'
  }
}

License

Copyright (c) 2014 Alberto Souza. Licensed under the MIT license.

Package Sidebar

Install

npm i grunt-we-ember-template

Weekly Downloads

0

Version

0.0.3

License

none

Last publish

Collaborators

  • albertosouza