
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
component-builder-handlebars
Advanced tools
Builder.js plugin to precompile Handlebars templates to Component.js modules.
var handlebarsPlugin = require('component-builder-handlebars');
var builder = new Builder('test/fixtures');
builder.use(handlebarsPlugin({
extname: '.hbs',
partialRegex: /^_/
}));
Or with grunt-component-build:
component: {
app: {
output: './build/',
scripts: true,
configure: function(builder) {
builder.use(handlebarsPlugin({
extname: '.hbs',
partialRegex: /^_/
}));
}
}
}
Type: String
Default value: .hbs
Define the Handlebars extension name.
Inspired from grunt-contrib-handlebars
Type: RegExp
Default value: /^_/
Define the prefix to identify Handlebars partials.
[componentName/path/to/_navPartial.hbs]
<nav>
<ul>
<li>…</li>
...
</ul>
</nav>
[componentName/path/to/myTemplate.hbs]
<h1>{{title}}</h1>
<!-- When you include a partial don't use the prefix -->
{{> componentName/path/to/navPartial}}
[componentName/path/to/module.js]
var myTpl = require('./myTemplate');
var output = myTpl({
title: 'Ready to start'
});
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Copyright (c) 2013 Antoine Lehurt
Licensed under the MIT license.
FAQs
Builder.js plugin to precompile Handlebars templates
The npm package component-builder-handlebars receives a total of 5 weekly downloads. As such, component-builder-handlebars popularity was classified as not popular.
We found that component-builder-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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.