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

broccoli-render-handlebars

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-render-handlebars

Broccoli plugin that renders handlebars templates

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

broccoli-render-handlebars

Broccoli plugin that renders handlebars templates.

Plugin supports caching:

  • It caches template files and re-render only changed files.
  • It caches partials and re-render all templates, when some partial is changed.

Install

npm install broccoli-render-handlebars

Usage

var renderHandlebars = require('broccoli-render-handlebars')

var tree = renderHandlebars('inputDir', {
  // Paths or glob patterns
  files: ['templates/**/*.hbs'],
  partials: ['partials/**/*.hbs']
})

renderHandlebars(inputTree, options)

inputTree

Broccoli input tree

options

Object with options

List of options

files

Type: array.<string>
Default: ['**/*.hbs', '**/*.handlebars']

List of files or glob patterns of templates to render.

partials

Type: array.<string>

List of files or glob patterns of partial templates.

makePartialName

Type: function(string) -> string
Default: Path with removed .hbs or .handlebars extension.

Function that takes path of partial and returns name.

helpers

Type: object

Handlebars helpers.

context

Type: object|function(string) -> object

Handlebars render context or function that takes path of template and returns context.

changeFileName

Type: function(string) -> string
Default: Path with .hbs or .handlebars extension changed to .html.

Function that takes path of template and returns name of rendered file.

handlebars

Type: object

Handlebars instance with already registered helpers and partials.

License

Public domain, see the LICENCE.md file.

Keywords

FAQs

Package last updated on 03 Feb 2015

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