New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

micro-tpl-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-tpl-loader

Micro mustache template loader for webpack

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

micro-tpl-loader

Micro mustache template loader for webpack.

npm github node

Support MicroMustache interpolation. Not for Handlebars and Mustache.

Installation

npm install micro-tpl-loader --save-dev

Usage

// example: webpack.config.cjs

const params = {
  // define params here
  foo: 'bar',
  xyz: {
    abc: 123
  }
};

module.exports = {
  module: {
    rules: [
      {
        test: /\.tpl$/,
        use: {
          loader: 'micro-tpl-loader',
          options: {
            params
          }
        }
      }
    ]
  }
};
<!-- index.tpl -->
<div>{{ foo }}</div>
<div>{{ xyz.abc }} - test</div>

↓↓

<!-- index.html -->
<div>bar</div>
<div>123 - test</div>

Keywords

handlebars

FAQs

Package last updated on 15 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts