# assemble-streams

> Assemble pipeline plugin for pushing views into a vinyl stream.

Latest version **1.0.1** (published 2017-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install assemble-streams
pnpm add assemble-streams
yarn add assemble-streams
bun add assemble-streams
```

## 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.1 |
| Published | 2017-02-11 |
| First published | 2015-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 8 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Jon Schlinkert |
| Maintainers | doowb, jonschlinkert |
| Keywords | assemble, assembleplugin, boilerplate, build, cli, cli-app, collection, command-line, create, dev, development, framework, front, frontend, plugin, project, projects, scaffold, scaffolder, scaffolding, source, src, stream, streams, template, templates, vinyl, webapp, yeoman, yo |

## Links

- npm: https://www.npmjs.com/package/assemble-streams
- Repository: https://github.com/assemble/assemble-streams
- Issues: https://github.com/assemble/assemble-streams/issues
- npm.io page: https://npm.io/package/assemble-streams

## Dependencies (8)

- [kind-of](https://npm.io/package/kind-of.md) ^3.1.0
- [through2](https://npm.io/package/through2.md) ^2.0.3
- [lazy-cache](https://npm.io/package/lazy-cache.md) ^2.0.2
- [match-file](https://npm.io/package/match-file.md) ^0.2.1
- [src-stream](https://npm.io/package/src-stream.md) ^0.1.1
- [is-valid-app](https://npm.io/package/is-valid-app.md) ^0.2.1
- [assemble-handle](https://npm.io/package/assemble-handle.md) ^0.1.3
- [define-property](https://npm.io/package/define-property.md) ^0.2.5

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2017-02-11
- 1.0.0 — 2017-02-11
- 0.7.0 — 2016-08-02
- 0.6.0 — 2016-05-24
- 0.5.0 — 2016-03-21
- 0.4.2 — 2016-03-07
- 0.4.1 — 2016-02-05
- 0.4.0 — 2016-01-19
- 0.3.1 — 2016-01-12
- 0.3.0 — 2015-12-01
- 0.2.1 — 2015-12-01
- 0.2.0 — 2015-10-16
- 0.1.1 — 2015-10-10
- 0.1.0 — 2015-10-10

## README

# assemble-streams [![NPM version](https://img.shields.io/npm/v/assemble-streams.svg?style=flat)](https://www.npmjs.com/package/assemble-streams) [![NPM monthly downloads](https://img.shields.io/npm/dm/assemble-streams.svg?style=flat)](https://npmjs.org/package/assemble-streams)  [![NPM total downloads](https://img.shields.io/npm/dt/assemble-streams.svg?style=flat)](https://npmjs.org/package/assemble-streams) [![Linux Build Status](https://img.shields.io/travis/assemble/assemble-streams.svg?style=flat&label=Travis)](https://travis-ci.org/assemble/assemble-streams)

> Assemble pipeline plugin for pushing views into a vinyl stream.

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save assemble-streams
```

## Usage

This plugin can be used with [assemble](https://github.com/assemble/assemble), [verb](https://github.com/verbose/verb) or any other application based on [templates](https://github.com/jonschlinkert/templates).

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

// create your application
var app = assemble();
// register the plugin
app.use(stream());

// use the plugin on app
app.toStream('pages')
  .pipe(app.dest('site/'));

// use the plugin on a collection
app.pages.toStream()
  .pipe(app.dest('site/'));

// use the plugin on a view
app.pages.getView('home').toStream()
  .pipe(app.dest('site/'));
```

See the [tests](./test.js) for more examples.

## API

### [app.toStream](index.js#L53)

Push a view collection into a vinyl stream.

**Params**

* `collection` **{String}**: Name of the collection to push into the stream.
* **{Function}**: Optionally pass a filter function to use for filtering views.
* `returns` **{Stream}**

**Example**

```js
app.toStream('posts', function(file) {
  return file.path !== 'index.hbs';
})
```

### [collection.toStream](index.js#L108)

Push a view collection into a vinyl stream.

**Params**

* **{Function}**: Optionally pass a filter function to use for filtering views.
* `returns` **{Stream}**

**Example**

```js
app.posts.toStream(function(file) {
  return file.path !== 'index.hbs';
})
```

### [view.toStream](index.js#L145)

Push the current view into a vinyl stream.

* `returns` **{Stream}**

**Example**

```js
app.pages.getView('a.html').toStream()
  .on('data', function(file) {
    console.log(file);
    //=> <Page "a.html" <Buffer 2e 2e 2e>>
  });
```

## About

### Related projects

* [assemble-loader](https://www.npmjs.com/package/assemble-loader): Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with… [more](https://github.com/assemble/assemble-loader) | [homepage](https://github.com/assemble/assemble-loader "Assemble plugin (^0.6.0) for loading globs of views onto custom view collections. Also works with verb or other Templates.js based applications.")
* [assemble-render-file](https://www.npmjs.com/package/assemble-render-file): Assemble plugin for rendering views in a vinyl pipeline. | [homepage](https://github.com/assemble/assemble-render-file "Assemble plugin for rendering views in a vinyl pipeline.")
* [assemble](https://www.npmjs.com/package/assemble): Get the rocks out of your socks! Assemble makes you fast at creating web projects… [more](https://github.com/assemble/assemble) | [homepage](https://github.com/assemble/assemble "Get the rocks out of your socks! Assemble makes you fast at creating web projects. Assemble is used by thousands of projects for rapid prototyping, creating themes, scaffolds, boilerplates, e-books, UI components, API documentation, blogs, building websit")

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** | 
| --- | --- |
| 34 | [jonschlinkert](https://github.com/jonschlinkert) |
| 21 | [doowb](https://github.com/doowb) |

### Building docs

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

### Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

```sh
$ npm install && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

### License

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
MIT

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 11, 2017._

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