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

babel-plugin-hyperstache

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-hyperstache

Babel plugin to pre-compile handlebars.

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-plugin-hyperstache

A Babel plugin to pre-compile handlebars.

Usage

Basic usage:

[
  ["hyperstache", {
    "tag": "hbs",
    "tagOut": "html",
    "runtime": "hyperstache/runtime"
  }]
]
// input:
hbs`<div id=hello>{{fruit}}</div>`({ fruit: 'Apple' });

// output:
const { template } = require("hyperstache/runtime");

template((hys,ctx,data) => html`<div id=hello>${
  hys.escape(hys.expr("fruit",ctx,{data}))
}</div>`)({ fruit: 'Apple' });

options

tag=hbs

By default, babel-plugin-hyperstache will process all Tagged Templates with a tag function named hbs. To use a different name, use the tag option in your Babel configuration:

{"plugins":[
  ["babel-plugin-hyperstache", {
    "tag": "myCustomHbsFunction"
  }]
]}

tagOut=html

The output tag given to Tagged Templates for further processing.

{"plugins":[
  ["babel-plugin-hyperstache", {
    "tagOut": "myCustomHtmlFunction"
  }]
]}

FAQs

Package last updated on 30 Oct 2019

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