
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
grunt-contrib-handlebars
Advanced tools
Precompile Handlebars templates to JST file.
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins. Once you're familiar with that process, install this plugin with this command:
npm install grunt-contrib-handlebars --save-dev
Run this task with the grunt handlebars
command.
This task is a [multi task][] so any targets, files and options should be specified according to the [multi task][] documentation. [multi task]: https://github.com/gruntjs/grunt/wiki/Configuring-tasks
Version 0.4.x
of this plugin is compatible with Grunt 0.4.x
. Version 0.3.x
of this plugin is compatible with Grunt 0.3.x
.
Type: String
Default: linefeed + linefeed
Concatenated files will be joined on this string.
Type: String
Default: 'JST'
The namespace in which the precompiled templates will be assigned. Use dot notation (e.g. App.Templates) for nested namespaces.
Example:
options: {
namespace: 'MyApp.Templates'
}
Type: Boolean
Default: false
Determine if preprocessed template functions will be wrapped in Handlebars.template function.
Type: function
This option accepts a function which takes one argument (the template filepath) and returns a string which will be used as the key for the precompiled template object. The example below stores all templates on the default JST namespace in capital letters.
options: {
processName: function(filename) {
return filename.toUpperCase();
}
}
Type: function
This option accepts a function which takes one argument (the partial filepath) and returns a string which will be used as the key for the precompiled partial object when it is registered in Handlebars.partials. The example below stores all partials using only the actual filename instead of the full path.
options: {
processPartialName: function(filePath) { // input: templates/_header.hbs
var pieces = filePath.split("/");
return pieces[pieces.length - 1]; // output: _header.hbs
}
}
Note: If processPartialName is not provided as an option the default assumes that partials will be stored by stripping trailing underscore characters and filename extensions. For example, the path templates/_header.hbs will become header and can be referenced in other templates as {{> header}}.
Type: Regexp
Default: /^_/
This option accepts a regex that defines the prefix character that is used to identify Handlebars partial files.
// assumes partial files would be prefixed with "par_" ie: "par_header.hbs"
options: {
partialRegex: /^par_/
}
handlebars: {
compile: {
options: {
namespace: "JST"
},
files: {
"path/to/result.js": "path/to/source.hbs",
"path/to/another.js": ["path/to/sources/*.hbs", "path/to/more/*.hbs"]
}
}
}
Task submitted by Tim Branyen
This file was generated on Wed Jan 23 2013 11:13:19.
FAQs
Precompile Handlebars templates to JST file.
The npm package grunt-contrib-handlebars receives a total of 9,991 weekly downloads. As such, grunt-contrib-handlebars popularity was classified as popular.
We found that grunt-contrib-handlebars demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 open source maintainers 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.