# gulp-handlebars-robot

> handlebars to html, auto load layout and json,batch process

Latest version **1.0.6** (published 2015-08-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-handlebars-robot
pnpm add gulp-handlebars-robot
yarn add gulp-handlebars-robot
bun add gulp-handlebars-robot
```

## 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.0.6 |
| Published | 2015-08-12 |
| First published | 2015-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+9 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sun Huai |
| Maintainers | bloodynumen |
| Keywords | gulpplugin, handlebars, handlebars-layout, template, auto, json, static |

## Links

- npm: https://www.npmjs.com/package/gulp-handlebars-robot
- Repository: https://github.com/bloodynumen/gulp-handlebars-robot
- Issues: https://github.com/bloodynumen/gulp-handlebars-robot/issues
- npm.io page: https://npm.io/package/gulp-handlebars-robot

## Dependencies (4)

- [through2](https://npm.io/package/through2.md) ^0.6.1
- [gulp-util](https://npm.io/package/gulp-util.md) ^3.0.0
- [handlebars](https://npm.io/package/handlebars.md) ^1.3.0
- [handlebars-layouts](https://npm.io/package/handlebars-layouts.md) ^1.1.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.0.6 (latest) — 2015-08-12
- 1.0.5 — 2015-04-20
- 1.0.4 — 2015-04-20
- 1.0.3 — 2015-04-20
- 1.0.2 — 2015-04-20
- 1.0.1 — 2015-04-20
- 1.0.0 — 2015-04-20

## README

## Usage

Install gulp-handlebars-robot as a development dependency:

```shell
npm install --save-dev gulp-handlebars-robot
```

## Compiling templates

Given the following directory structure:

```
src                          # Your application's source files
-- tpl
    |-- hbs                  # A folder containing templates named with dot notation
    |   |-- app
    |   |   `-- detail.hbs
    |   `-- index.hbs
    |-- json                 # A folder containing json data for templates
    |   |-- app
    |   |   `-- detail.json
    |   `-- index.json       # json for index.hbs, allow not existed
    `-- layout
        `-- main-layout.hbs # layout file for handlebars-layouts
```

## gulpfile.js

``` javascript
gulp.task('tpl', ['clean-tpl'], function() {
  return gulp.src('./src/tpl/hbs/**/*')
    .pipe(handlebars_robot({
      root: './src/tpl/', //the root that contain json directory and layout directory
      ext: '.html' //output file extention
    }))
    .pipe(gulp.dest('./build/tpl/'));
});
```

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