Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

component-builder-handlebars

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-builder-handlebars

Builder.js plugin to precompile Handlebars templates

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
increased by50%
Maintainers
1
Weekly downloads
 
Created
Source

component-builder-handlebars Build Status

Builder2.js plugin to precompile Handlebars templates to Component.js modules.

Install

With npm do:

$ npm install component-builder-handlebars --save-dev

Usage

Build

var builder = require('component-builder');
var hbs = require('component-builder-handlebars');

var options = {
  extname: 'hbs',
  partialRegex: /^_/
};

builder.scripts(tree)
  .use('scripts', Builder.plugins.js())
  .use('templates', hbs(options))
  .end(function(err, string) {
    fs.writeFileSync(dest, string);
  });

Partials

To include a partial inside a template:

{{> componentName/path/to/_partial }}

For instance.

Options

extname

Type: String
Default value: .hbs
Define the Handlebars extension name.

partialRegex

Inspired from grunt-contrib-handlebars
Type: RegExp
Default value: /^_/
Define the prefix to identify Handlebars partials.

Example

See example folder.

To build it:

$ npm run example

License

Licensed under the MIT license.

Keywords

FAQs

Package last updated on 03 Jun 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc