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

https://github.com/doowb/assemble-push

Push a collection of templates into an assemble stream as vinyl objects.
https://github.com/doowb/assemble-push

Last synced: about 1 month ago
JSON representation

Push a collection of templates into an assemble stream as vinyl objects.

Awesome Lists containing this project

README

        

# assemble-push [![NPM version](https://badge.fury.io/js/assemble-push.svg)](http://badge.fury.io/js/assemble-push)

> Push a collection of templates into an assemble stream as vinyl objects.

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

```bash
npm i assemble-push --save
```

## Run tests

```bash
npm test
```

## Usage

```js
var assemblePush = require('assemble-push');
```

## API
### [.assemble-push](index.js#L25)

Return a function that will create a stream for pushing template objects onto a stream.

* `app` **{Object}**: An application inherited from `template`.
* `returns` **{Function}**: Factory function used to build a stream.

```js
var assemble = require('assemble');
var push = require('assemble-push')(assemble);
```

### [push](index.js#L45)

Return a stream that will push a collection of templates onto a stream.

* `collection` **{String}**: Name of the collection to push into the stream.
* `returns` **{Stream}**: Stream used in piping objects through.

```js
// When you have a `posts` template type,
// push the posts into the stream to render
assemble.task('build-posts', function () {
push('posts')
.pipe(assemble.dest('_gh_pages/posts'));
});
```

## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/doowb/assemble-push/issues)

## Author

**Brian Woodward**

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

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

***

_This file was generated by [verb](https://github.com/assemble/verb) on December 09, 2014._