Gathering detailed insights and metrics for dwy-mustache-loader
Gathering detailed insights and metrics for dwy-mustache-loader
Gathering detailed insights and metrics for dwy-mustache-loader
Gathering detailed insights and metrics for dwy-mustache-loader
npm install dwy-mustache-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
58.6
Supply Chain
92.4
Quality
73.6
Maintenance
50
Vulnerability
99.1
License
JavaScript (98.61%)
HTML (1.39%)
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-50%
1
Compared to previous week
Last month
200%
3
Compared to previous month
Last year
-25.6%
67
Compared to previous year
Compiles Mustache templates with Hogan and optionally html-minifier.
1$ npm i -S dwy-mustache-loader
1module: { 2 loaders: [ { 3 test: /\.html$/, 4 loader: 'dwy-mustache' 5 // loader: 'mustache?minify' 6 // loader: 'mustache?{ minify: { removeComments: false } }' 7 // loader: 'mustache?noShortcut' 8 } ] 9}
1module: { 2 rules: [ { 3 test: /\.html$/, 4 loader: 'dwy-mustache-loader' 5 // loader: 'mustache-loader?minify' 6 // loader: 'mustache-loader?{ minify: { removeComments: false } }' 7 // loader: 'mustache-loader?noShortcut' 8 } ] 9}
1var template = require('./template.html'); 2var html = template({ foo: 'bar' });
If noShortcut
is passed, then Hogan compiled template is returned instead, so
you can pass it as partial.
1var template = require('./template.html'); 2var template2 = require('./template2.html'); 3var html = template.render({ foo: 'bar' }, {partial: template2});
If clientSide
is passed in, then Hogan will not pre-compile the template.
If tiny
is passed in, the source of the template will not be emitted, creating a smaller output.
if render
is passed in, the data is sent is used to immediately render the template.
For example, the following will render index.mustache
with the provided data (title
), which can immediately be used by HtmlWebpackPlugin.
1module: { 2 rules: [ { 3 test: /index\.mustache$/, 4 loader: 'dwy-mustache-loader', 5 options: { 6 tiny: true, 7 render: { 8 title: 'hello world', 9 }, 10 partials:{ 11 header:``, 12 footer:`` 13 } 14 }, 15 } ] 16} 17plugins: [ 18 new HtmlWebpackPlugin({ 19 template: 'index.mustache', 20 inject: 'body', 21 }), 22]
If another loader is chained after Mustache-Loader then the minify
, clientSide
, and tiny
options will be ignored.
Any additional Hogan parameters passed into this loader will be passed through to Hogan.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More