
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@pro-vision/assemble-lite
Advanced tools
Minimal Tool to render Handlebars-Files via Node.
npm i @pro-vision/assemble-lite -D
const assembleLite = require('@pro-vision/assemble-lite');
assembleLite({
baseDir: 'src/pages/',
partials: 'src/components/**/*.hbs',
pages: 'src/pages/**/*.hbs',
templates: 'src/templates/**/*.hbs',
data: [
'src/components/**/*.json',
'src/components/**/*.yaml',
'src/templates/**/*.json',
'src/templates/**/*.yml'
],
helpers: 'src/helpers/*.js',
target: 'target/pages',
}).then(() => {
console.log('done!!');
});
key | type | usage |
---|---|---|
baseDir | path | Defines base directory |
partials | glob | glob[] | where are the partials |
pages | glob | glob[] | where are the pages |
templates | glob | glob[] | where are the templates |
data | glob | glob[] | where is the data |
helpers | glob | glob[] | where are the custom handlebars-helpers (the collection from handlebars-helpers is already included - out of the box) |
target | glob | glob[] | defines, where to put the rendered files |
When generating html files, you can provide some data to be passed to the handlebars template and pages.
These data can be local to the template and would only be applied to it, when set as yaml front-matter in the .hbs file.
Or be global and accessible by all the templates via the handlebars @root
object. Global data are all .json
, .yaml
, .yml
and *__data.js
files in the src and pages directory. The js file would need to have a default function that returns a json. This function can also return a promise, but keep in mind that this will slow down the build time and make build caching more difficult.
// some-component__data.js
module.exports = async function() {
await someFileSystemIO();
return {
// the actual data
};
}
FAQs
Minimal Tool to render Handlebars-Files via Node
The npm package @pro-vision/assemble-lite receives a total of 415 weekly downloads. As such, @pro-vision/assemble-lite popularity was classified as not popular.
We found that @pro-vision/assemble-lite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.