Giter Site home page Giter Site logo

ember-templates-loader's Introduction

ember-templates-loader

Load templates into Ember with webpack.

Description

This will precompile your HTMLBars templates when you build with webpack with overrides specific for Ember.

Usage

var MyView = Ember.View.extend({
  template: require('ember-templates!./templates/my-view.hbs')
});

Or better within your webpack.config.js:

module.exports = {
  module: {
    loaders: [
      { test: /\.hbs$/, loader: 'ember-templates' }
    ]
  },
  emberTemplatesLoader: {
    // Where to require the compiler from, defaults to an internal compiler.
    compiler: 'ember/ember-template-compiler',
    // OR: Pass in the precompiler directly...
    // precompile: require('ember/ember-template-compiler').precompile,
  }
};

Now all required handlebars templates will be compiled for Ember first.

Install

npm install ember-templates-loader --save-dev

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

Release History

  • 1.12.0 - Marks the start of versioning in sync with Ember - the template compilier is required to match the version of Ember.
  • 1.3.1 - Remove napa from install in package.json
  • 1.3.0 - Include ember-template-compiler directly instead of using napa.
  • 1.2.0 - Wrap template in Ember.HTMLBars.template()
  • 1.1.0 - Support for Ember 1.10 and HTMLBars
  • 1.0.1 - Include ember-template-compiler in package.json (@mzgoddard)
  • 1.0.0 - Update to Handlebars 2.0 and template compiler for Ember 1.9 (@mzgoddard)
  • 0.2.0 - Precompile templates for Ember and publish

License

Copyright (c) 2015 Kyle Robinson Young
Licensed under the MIT license.

ember-templates-loader's People

Contributors

shama avatar gnarf avatar mzgoddard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.