{"id":18434704,"url":"https://github.com/assemble/assemble-streams","last_synced_at":"2025-06-17T08:33:17.339Z","repository":{"id":57184974,"uuid":"44016767","full_name":"assemble/assemble-streams","owner":"assemble","description":"Assemble plugin that adds convenience methods for working with streams, like `toStream`, which pushes a view collection into a vinyl stream.","archived":false,"fork":false,"pushed_at":"2020-04-01T00:05:25.000Z","size":42,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-28T18:38:30.539Z","etag":null,"topics":["assemble","stream","vinyl"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/assemble.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-10T15:46:27.000Z","updated_at":"2017-10-18T21:36:24.000Z","dependencies_parsed_at":"2022-09-14T09:50:12.603Z","dependency_job_id":null,"html_url":"https://github.com/assemble/assemble-streams","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/assemble/assemble-streams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assemble","download_url":"https://codeload.github.com/assemble/assemble-streams/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-streams/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260322254,"owners_count":22991795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assemble","stream","vinyl"],"created_at":"2024-11-06T06:05:00.803Z","updated_at":"2025-06-17T08:33:17.293Z","avatar_url":"https://github.com/assemble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"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\u0026label=Travis)](https://travis-ci.org/assemble/assemble-streams)\n\n\u003e Assemble pipeline plugin for pushing views into a vinyl stream.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save assemble-streams\n```\n\n## Usage\n\nThis 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).\n\n```js\nvar assemble = require('assemble');\nvar streams = require('assemble-streams');\n\n// create your application\nvar app = assemble();\n// register the plugin\napp.use(streams());\n\n// use the plugin on app\napp.toStream('pages')\n  .pipe(app.dest('site/'));\n\n// use the plugin on a collection\napp.pages.toStream()\n  .pipe(app.dest('site/'));\n\n// use the plugin on a view\napp.pages.getView('home').toStream()\n  .pipe(app.dest('site/'));\n```\n\nSee the [tests](./test/test.js) for more examples.\n\n## API\n\n### [app.toStream](index.js#L53)\n\nPush a view collection into a vinyl stream.\n\n**Params**\n\n* `collection` **{String}**: Name of the collection to push into the stream.\n* **{Function}**: Optionally pass a filter function to use for filtering views.\n* `returns` **{Stream}**\n\n**Example**\n\n```js\napp.toStream('posts', function(file) {\n  return file.path !== 'index.hbs';\n})\n```\n\n### [collection.toStream](index.js#L108)\n\nPush a view collection into a vinyl stream.\n\n**Params**\n\n* **{Function}**: Optionally pass a filter function to use for filtering views.\n* `returns` **{Stream}**\n\n**Example**\n\n```js\napp.posts.toStream(function(file) {\n  return file.path !== 'index.hbs';\n})\n```\n\n### [view.toStream](index.js#L145)\n\nPush the current view into a vinyl stream.\n\n* `returns` **{Stream}**\n\n**Example**\n\n```js\napp.pages.getView('a.html').toStream()\n  .on('data', function(file) {\n    console.log(file);\n    //=\u003e \u003cPage \"a.html\" \u003cBuffer 2e 2e 2e\u003e\u003e\n  });\n```\n\n## About\n\n### Related projects\n\n* [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.\")\n* [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.\")\n* [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\")\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 34 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 21 | [doowb](https://github.com/doowb) |\n\n### Building docs\n\n_(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.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n### Running tests\n\nRunning 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:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n### Author\n\n**Jon Schlinkert**\n\n* [github/jonschlinkert](https://github.com/jonschlinkert)\n* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)\n\n### License\n\nCopyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).\nMIT\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.2, on February 11, 2017._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fassemble-streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassemble%2Fassemble-streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fassemble-streams/lists"}