# hbs-commandline

> Invoke handlebars from the commandline. Specifically, using to convert [ZAP](https://www.zaproxy.org/) reports to xml and show into Azure Devops Test Results

Latest version **0.1.2** (published 2022-03-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install hbs-commandline
pnpm add hbs-commandline
yarn add hbs-commandline
bun add hbs-commandline
```

Provides the command `hbs-commandline`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2022-03-30 |
| First published | 2022-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 32.1 KB |
| Known vulnerabilities | 0 (+9 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | nhatduynguyen |
| Maintainers | nhatduy1407 |

## Links

- npm: https://www.npmjs.com/package/hbs-commandline
- Repository: https://github.com/NhatDuy1407/handlebars-cli
- Homepage: https://github.com/NhatDuy1407/handlebars-cli#readme
- Issues: https://github.com/NhatDuy1407/handlebars-cli/issues
- npm.io page: https://npm.io/package/hbs-commandline

## Dependencies (2)

- [optimist](https://npm.io/package/optimist.md) ~0.3.5
- [handlebars](https://npm.io/package/handlebars.md) ~1.0.10

## Recent versions

- 0.1.2 (latest) — 2022-03-30
- 0.1.1 — 2022-03-29
- 0.1.0 — 2022-03-29
- 0.0.9 — 2022-03-29
- 0.0.8 — 2022-03-29
- 0.0.7 — 2022-03-29
- 0.0.6 — 2022-03-29
- 0.0.5 — 2022-03-29
- 0.0.4 — 2022-03-29
- 0.0.3 — 2022-03-29
- 0.0.2 — 2022-03-29
- 0.0.1 — 2022-03-29

## README

# hbs-commandline

Invoke handlebars from the commandline.
Specifically, using to convert [ZAP](https://www.zaproxy.org/) reports to xml and show into Azure Devops Test Results

## Installation
    
```sh
$ npm install -g hbs-commandline
```

## Usage
```sh
Usage:
    hbs-commandline data.json ./helpers.js < template.hbs > output.xml
    data.json               Parse data
    helpers.js              Custom helpers (fullpath)
    template.hbs            Your template
    output.xml              Output rendered templates
```

## Include helpers

```js
// helpers.js
var helpers = function () {};

helpers.register = function (Handlebars) {
    Handlebars.registerHelper('convertRiskCode', function(value) {
        return value !== "0" ? "Failed" : "Not Impacted";
    });
};

module.exports = helpers;
```

## Use case
https://github.com/NhatDuy1407/azure-pipelines-zap-scanner

## License

MIT

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