Napolean Paced Mischeviously
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

atlassian-mustache-loader

0.3.1 • Public • Published

Mustache loader for webpack

npm travis climate peer deps gratipay

Compiles Mustache templates with Hogan and optionally html-minifier.

Install

$ npm i -S mustache-loader

Usage

module: {
    loaders: [ {
        test: /\.html$/,
        loader: 'mustache'
        // loader: 'mustache?minify'
        // loader: 'mustache?{ minify: { removeComments: false } }'
        // loader: 'mustache?noShortcut'
    } ]
}
var template = require('./template.html');
var html = template({ foo: 'bar' });

If noShortcut is passed, then Hogan compiled template is returned instead, so you can pass it as partial.

var template = require('./template.html');
var template2 = require('./template2.html');
var html = template.render({ foo: 'bar' }, {partial: template2});

Documentation: Using loaders.

License

WTFPL

install

npm i atlassian-mustache-loader

Downloadsweekly downloads

2

version

0.3.1

license

WTFPL

homepage

github.com

last publish

collaborators

  • avatar