Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
grunt-dust-html
Advanced tools
This task renders Dust templates against a context to produce HTML.
Install this plugin with the command:
npm install grunt-dust-html
Next, add this line to your project's grunt file:
grunt.loadNpmTasks("grunt-dust-html");
Lastly, add the configuration settings (see below) to your grunt file.
This task has two required properties, src
and dest
. src
is the path to your source file and dest
is the file this task will write to (relative to the grunt.js file). If this file already exists it will be overwritten.
An example configuration looks like this:
grunt.initConfig({
dusthtml: {
dist: {
src: "src/home.dust",
dest: "dist/home.html",
options: {
// see below for options. this is optional.
}
}
}
});
This plugin can be customized by specifying the following options:
whitespace
(Boolean): Whether or not to preserve whitespace. false
by default.partialsDir
(String|Array): Path to one or more directories that contain your partials.defaultExt
(String): The default template extension of your partials. Defaults to .dust
.module
(String): The name of the Dust module to use. Defaults to
dustjs-linkedin
but can also be dust
for plain ol' dust, or
dustjs-helpers
for the LinkedIn Dust build with helpers. If this option is
anything other than the default, make sure you have installed the module via
npm install
.context
(Object|String): A JavaScript object to render the template against. This option supports two different types:String: the location to a file containing valid JSON:
context: "path/to/file.json"
Object: a regular ol' JavaScript object:
context: {
pageTitle: "My Awesome Website"
}
Array: an array of contexts, either string (files to parse) or JavaScript objects, or both. Each item in the array will be merged into a single context and rendered against the template:
context: [
"path/to/context.json",
"path/to/another/context.json",
{ more: "data" }
]
basePath
option.Run npm test
.
FAQs
Grunt task to render Dust templates to HTML
The npm package grunt-dust-html receives a total of 3 weekly downloads. As such, grunt-dust-html popularity was classified as not popular.
We found that grunt-dust-html demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.