# gulp-layoutize

> Render contents of input files through a templating engine (powered by consolidate.js)

Latest version **0.0.4** (published 2014-05-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-layoutize
pnpm add gulp-layoutize
yarn add gulp-layoutize
bun add gulp-layoutize
```

## 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.0.4 |
| Published | 2014-05-20 |
| First published | 2014-02-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8.0 |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Micheal Benedict |
| Maintainers | rowoot |
| Keywords | gulp plugin, gulpplugin, layoutize, templatize, template, gulp consolidate |

## Links

- npm: https://www.npmjs.com/package/gulp-layoutize
- Repository: https://github.com/rowoot/gulp-layoutize
- Homepage: https://github.com/rowoot/gulp-layoutize/
- Issues: https://github.com/rowoot/gulp-layoutize/issues/
- npm.io page: https://npm.io/package/gulp-layoutize

## Dependencies (4)

- [through2](https://npm.io/package/through2.md) *
- [gulp-util](https://npm.io/package/gulp-util.md) ~2.2.0
- [consolidate](https://npm.io/package/consolidate.md) ~0.10.0
- [node.extend](https://npm.io/package/node.extend.md) ~1.0.9

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2014-05-20
- 0.0.3 — 2014-03-12
- 0.0.2 — 2014-02-24

## README

# gulp-layoutize
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][depstat-image]][depstat-url]

> Render contents of input files through a templating engine (powered by consolidate.js)

## Usage

First, install `gulp-layoutize` as a development dependency:

```shell
npm install --save-dev gulp-layoutize
```

Then, add it to your `gulpfile.js`:

```javascript
var layoutize = require("gulp-layoutize");

gulp.src("./src/*.ext")
	.pipe(layoutize({
		templatePath: 'path/to/template',
    engine: 'templatingEngine',
    locals: {}
	}))
	.pipe(gulp.dest("./dist"));
```

## API

### layoutize(options)

Either define `options.templatePath` or `options.template`. If both are given, `options.templatePath` is used.

#### options.templatePath
Type: `String`
Default: `undefined`
Required: `true`

Path to template.

#### options.template
Type: `String`
Default: `undefined`
Required: `true`

Template content.

#### options.engine
Type: `String`
Default: `undefined`
Required: `true`

Provide the templating engine name as supported by `consolidate.js`.

#### options.locals
Type: `Object`
Default: `{}`
Required: `true`

The locals object is passed as template variables to the templating engine. Refer to the templating engine guides on how to use variables in the template.
Also, you have some predefined locals, refering to the current file:

* content (String): content of the current file
* file (Object): [vinyl](https://github.com/wearefractal/vinyl#file) file object with filename, path, etc.


## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/gulp-layoutize
[npm-image]: https://badge.fury.io/js/gulp-layoutize.png

[travis-url]: http://travis-ci.org/rowoot/gulp-layoutize
[travis-image]: https://secure.travis-ci.org/rowoot/gulp-layoutize.png?branch=master

[coveralls-url]: https://coveralls.io/r/rowoot/gulp-layoutize
[coveralls-image]: https://coveralls.io/repos/rowoot/gulp-layoutize/badge.png

[depstat-url]: https://david-dm.org/rowoot/gulp-layoutize
[depstat-image]: https://david-dm.org/rowoot/gulp-layoutize.png

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