1.1.2 • Published 6 years ago

mustache-static-loader v1.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

mustache-static-loader

Mustache.js static loader for Webpack.

This is tiny webpack loader which wraps Mustache.js to render mustache templates during webpack build. Data for mustache templates (views) is passed using viewData property of loader options object. Custom delimiters (tags) can be set with the help of delimiters options field.

Install

$ npm i mustache-static-loader --save

Usage

WebPack 2.x

module: {
    rules: [ {
        test: /\.html$/,
        use: [
            {
                loader: 'apply-loader'
            },
            {
                loader: 'mustache-static-loader',
                options: {
                    delimiters: ['<$', '$>'], // (optional) allows to pass custom delimiters (tags) to Mustache
                    viewData: { // data object which will be passed to templates for rendering
                        title: 'Hello World!'
                    }
                }
            }
        ]
    } ]
}
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago