# babel-plugin-hyperstache

> Babel plugin to pre-compile handlebars.

Latest version **0.1.0** (published 2019-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-hyperstache
pnpm add babel-plugin-hyperstache
yarn add babel-plugin-hyperstache
bun add babel-plugin-hyperstache
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2019-10-30 |
| First published | 2019-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wesley Luyten |
| Maintainers | luwes |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-hyperstache
- npm.io page: https://npm.io/package/babel-plugin-hyperstache

## Dependencies (1)

- [hyperstache](https://npm.io/package/hyperstache.md) ^0.3.0

## Recent versions

- 0.1.0 (latest) — 2019-10-30
- 0.0.1 — 2019-10-26

## README

# `babel-plugin-hyperstache`

A Babel plugin to pre-compile handlebars.

## Usage

Basic usage:

```js
[
  ["hyperstache", {
    "tag": "hbs",
    "tagOut": "html",
    "runtime": "hyperstache/runtime"
  }]
]
```

```js
// 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:

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

### `tagOut=html`

The output tag given to Tagged Templates for further processing.

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

---
_Source: https://npm.io/package/babel-plugin-hyperstache · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
