JSPM

justo-plugin-handlebars

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q20017F

Plugin for Handlebars template system.

Package Exports

  • justo-plugin-handlebars

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (justo-plugin-handlebars) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Build Status

Plugin for Handlebars template system.

Proudly made with ♥ in Valencia, Spain, EU.

Install

npm install justo-plugin-handlebars

render task

To render a file:

render(opts, config)

The config properties:

  • src (string). The template file.
  • dst (string). The destination file.
  • scope (object). The data.
  • helpers (object). Custom helpers to use.
  • partials (object). Custom partials to use.

Example:

const hbs = require("justo-plugin-handlebars");

hbs.render("Generate conf/mongod.conf", {
  src: "templates/conf/mongod.conf",
  dst: "/opt/mongodb/conf/mongod.conf",
  scope: {
    dataFolder: "/opt/mongodb/data/",
    logFolder: "/opt/mongodb/log/",
    journal: true
  }
});