Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@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
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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.