# hb-interpolate

> Interpolate a json file through a Handlebars template file to stdout.

Latest version **1.1.1** (published 2018-04-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install hb-interpolate
pnpm add hb-interpolate
yarn add hb-interpolate
bun add hb-interpolate
```

Provides the command `hb-interpolate`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-04-12 |
| First published | 2015-05-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 9.3 KB |
| Known vulnerabilities | 0 (+4 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jim Lloyd |
| Maintainers | jimlloyd |
| Keywords | handlebars, json, interpolate, render, cli |

## Links

- npm: https://www.npmjs.com/package/hb-interpolate
- Repository: https://github.com/jimlloyd/hb-interpolate
- Issues: https://github.com/jimlloyd/hb-interpolate/issues
- npm.io page: https://npm.io/package/hb-interpolate

## Dependencies (9)

- [npm](https://npm.io/package/npm.md) ^5.8.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.2
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.5
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.1
- [jsonfile](https://npm.io/package/jsonfile.md) ^4.0.0
- [commander](https://npm.io/package/commander.md) ^2.8.1
- [handlebars](https://npm.io/package/handlebars.md) ^4.0.0
- [read-package-json](https://npm.io/package/read-package-json.md) ^2.0.0

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-04-12
- 1.1.0 — 2018-04-11
- 1.0.0 — 2015-05-12

## README

# hb-interpolate
*Interpolate a json file through a [Handlebars](http://handlebarsjs.com/) template file to stdout.*

[![Build Status](https://travis-ci.org/jimlloyd/hb-interpolate.svg?branch=master)](https://travis-ci.org/jimlloyd/hb-interpolate)

### About

`hb-interpolate` is a very simple command line tool that reads a `.json` file and a Handlebars template file, and then writes the implied interpolation to stdout.

### Usage

```
$ hb-interpolate --help

  Usage: hb-interpolate [options]

  Options:

    -h, --help             output usage information
    -j, --json [path]      JSON file with input data
    -t, --template [path]  Handlebars template to interpolate
    -n, --noEscape         Don't do HTML escaping

If the JSON file is a package.json, read-package-json is used to read the file.
Note that read-package-json normalizes some fields.
  `--json [path]` and `--tempate [path]` are REQUIRED.
```

### Notes

* The `--json [path]` and `--template [path]` arguments are required.
* If the basename of the json path is `package.json`, hb-interpolate uses the node package [read-package-json](https://www.npmjs.com/package/read-package-json) to read the file, which normalizes some fields, in particular all [people fields](https://docs.npmjs.com/files/package.json#people-fields-author-contributors). Any other json file is returned directly as read.
* The `--noEscape` option may be used to turn off Handlebars HTML escaping.

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