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.
- Host: GitHub
- URL: https://github.com/assemble/assemble-middleware-buffer
- Owner: assemble
- License: mit
- Created: 2014-06-30T17:32:35.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-06-30T17:33:25.000Z (almost 12 years ago)
- Last Synced: 2025-02-16T10:15:04.626Z (over 1 year ago)
- Language: JavaScript
- Size: 109 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# assemble-middleware-buffer [](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._