3.0.1 • Published 7 years ago
@roundingwellos/babel-plugin-handlebars-inline-precompile v3.0.1
babel-plugin-handlebars-inline-precompile
Precompile inline Handlebars templates.
Example
In
import hbs from 'handlebars-inline-precompile';
hbs`Hello World!`;Out
import _Handlebars from 'handlebars/runtime';
_Handlebars.template({ /* A bunch of crazy template stuff */ })Installation
$ npm install babel-plugin-handlebars-inline-precompileUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["handlebars-inline-precompile"]
}Via CLI
$ babel --plugins handlebars-inline-precompile script.jsVia Node API
require("babel-core").transform("code", {
plugins: ["handlebars-inline-precompile"]
});