Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/best-shot/micro-tpl-loader
Micro mustache template loader for webpack
https://github.com/best-shot/micro-tpl-loader
barbe handlebars html mustache template tpl webpack
Last synced: about 1 month ago
JSON representation
Micro mustache template loader for webpack
- Host: GitHub
- URL: https://github.com/best-shot/micro-tpl-loader
- Owner: best-shot
- License: mit
- Created: 2019-01-16T07:41:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T16:20:52.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T07:07:04.935Z (about 2 months ago)
- Topics: barbe, handlebars, html, mustache, template, tpl, webpack
- Language: JavaScript
- Size: 294 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# micro-tpl-loader
Micro mustache template loader for webpack.
[![npm][npm-badge]][npm-url]
[![github][github-badge]][github-url]
![node][node-badge][npm-url]: https://www.npmjs.com/package/micro-tpl-loader
[npm-badge]: https://img.shields.io/npm/v/micro-tpl-loader.svg?style=flat-square&logo=npm
[github-url]: https://github.com/airkro/micro-tpl-loader
[github-badge]: https://img.shields.io/npm/l/micro-tpl-loader.svg?style=flat-square&colorB=blue&logo=github
[node-badge]: https://img.shields.io/node/v/micro-tpl-loader.svg?style=flat-square&colorB=green&logo=node.jsSupport [MicroMustache](https://www.npmjs.com/package/micromustache) interpolation. Not for `Handlebars` and `Mustache`.
## Installation
```bash
npm install micro-tpl-loader --save-dev
```## Usage
```cjs
// example: webpack.config.cjsconst params = {
// define params here
foo: 'bar',
xyz: {
abc: 123
}
};module.exports = {
module: {
rules: [
{
test: /\.tpl$/,
use: {
loader: 'micro-tpl-loader',
options: {
params
}
}
}
]
}
};
``````html
{{ foo }}{{ xyz.abc }} - test↓↓
bar123 - test
```