Giter Club home page Giter Club logo

broccoli-ember-inline-template-compiler's Introduction

Broccoli Ember Inline Template Compiler

Broccoli plugin that precompiles inline Handlebars templates so that libraries or applications can be packaged with Handlebars Runtime only instead of the full library.

Documentation

inlineTemplateCompiler(inputTree)

inputTree {Single Tree}

Input is a single tree.

Usage

In order for Broccoli Ember Inline Template Compiler to pickup inline templates, they must be assigned to a local variable called precompileTemplate

Example:

  // instead of
  var template = Ember.Handlebars.compile("...");

  // do
  var precompileTemplate = Ember.Handlebars.compile;
  var template = precompileTemplate("...");

Installation (as Broccoli plugin)

npm install --save-dev broccoli-ember-inline-template-compiler

And then in your Brocfile.js:

var inlineTemplateCompiler = require('broccoli-ember-inline-template-compiler');

tree = inlineTemplateCompiler(tree);

Installation (as ember-cli addon)

npm install --save-dev broccoli-ember-inline-template-compiler

No changes to your Brocfile.js

Credits

Extracted from https://github.com/emberjs/ember.js/blob/master/lib/broccoli-ember-inline-template-precompiler.js. Authored by @rwjblue, @fivetanley, and @concreted.

License

This project is distributed under the MIT license.

broccoli-ember-inline-template-compiler's People

Contributors

elucid avatar kenips avatar rwjblue avatar

Stargazers

 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.