
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
assemble-webpack-handlebars
Advanced tools
Webpack Loader + Plugin for Assemble.io handlebar compilation
Webpack Loader + Plugin for compiling Handlebars using Assemble.io
Generates HTML pages using Handlebars templating and Assemble's power.
This plugin is compatible with updated version of webpack(4.0.0+) and sass.
npm install --save-dev assemble-webpack-handlebars
const assembleWebpack = require('assemble-webpack-handlebars');
const handlebarsHelpers = require('handlebars-helpers');
module.exports = {
// webpack configurations
module: {
rules: [
{
test: /\.(hbs)$/,
use: [
{
loader: 'assemble-webpack-handlebars'
}
]
}
]
},
plugins: [
new assembleWebpack.AttachedPlugin({
baseLayout: ['./src/app/layouts/**/*.hbs'],
basePages: ['./src/app/pages/**/*.hbs'],
partialsLayout: ['./src/app/fe-components/**/*.hbs'],
partialsData: [
'./src/app/fe-components/**/*.json',
'./src/app/layouts/**/*.json',
'./src/app/pages/**/*.json'
],
helpers: [handlebarsHelpers(), './src/app/helpers/custom-helpers.js']
})
]
};
Name | Type | Description |
---|---|---|
baseLayout | array | Relative path of Base Layout files considered as Main template. It acts as HTML skeleton and used by the actual basePages. |
basePages | array | Relative path of Base Pages. These will generate the Actual HTML files as an output |
partialsLayout | array | Relative path of HBS partials. These are smaller re-usable components and can used inside another components or pages |
partialsData | array | Relative path of JSON data which will be interpolated in HBS components. |
helpers | array | Relative path of custom helpers files |
assembleWebpack
is used as a plugin to provide the required configurations and to compile handlebar files using assembler.io during Webpack build.assemble-webpack-handlebars
as a loader to compile Handlebars files with extension hbs
Note: Until you link the required resources in your project's dependency graph, Webpack will NOT be able to track it for any changes during Watch
mode or while running Webpack-dev-server
.
So even though assembleWebpack
plugin generates the output during Webpack build, you still need to explicitly import/require
the Handlebar resources somewhere in your project so that it can be re-compiled on the respective file changes.
FAQs
Webpack Loader + Plugin for Assemble.io handlebar compilation
The npm package assemble-webpack-handlebars receives a total of 88 weekly downloads. As such, assemble-webpack-handlebars popularity was classified as not popular.
We found that assemble-webpack-handlebars 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.