An open API service indexing awesome lists of open source software.

https://github.com/assemble/assemble-middleware-buffer

Buffer files into a specified array on the Assemble context.
https://github.com/assemble/assemble-middleware-buffer

Last synced: about 1 year ago
JSON representation

Buffer files into a specified array on the Assemble context.

Awesome Lists containing this project

README

          

# assemble-middleware-buffer [![NPM version](https://badge.fury.io/js/assemble-middleware-buffer.png)](http://badge.fury.io/js/assemble-middleware-buffer)

> Buffer files into a specified array on the Assemble context.

## Install
Install with [npm](npmjs.org):

```bash
npm i assemble-middleware-buffer --save-dev
```

## Buffer
### buffer

Add files to the specified array on Assemble.

**Usage**

```js
var assemble = require('assemble');
var buffer = require('assemble-middleware-buffer')(assemble);
var tap = require('gulp-tap');

assemble.src('path/to/pages/*.hbs')
.pipe(buffer({type: 'posts'}))
.pipe(tap(function (file) {
console.log('posts', assemble.posts);
});
```

* `options` {Object}: object containing options: * {String} `type` name of the array to store the files in.
* `return` {Stream} stream to continue piping.

## Author

**Brian Woodward**

+ [github/assemble](https://github.com/assemble)
+ [twitter/assemble](http://twitter.com/assemble)

## License
Copyright (c) 2014 Brian Woodward, contributors.
Released under the MIT license

***

_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 30, 2014._