{"id":18434702,"url":"https://github.com/assemble/assemble-fs","last_synced_at":"2025-04-07T19:31:55.630Z","repository":{"id":57184943,"uuid":"44018889","full_name":"assemble/assemble-fs","owner":"assemble","description":"Assemble plugin that adds methods to assemble for working with the file system, like src, dest, copy and symlink.","archived":false,"fork":false,"pushed_at":"2018-12-12T01:11:10.000Z","size":148,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T00:02:12.329Z","etag":null,"topics":["assemble","assemble-pipeline-plugin","fs","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-10T16:43:46.000Z","updated_at":"2021-07-04T16:25:52.000Z","dependencies_parsed_at":"2022-09-14T10:11:04.291Z","dependency_job_id":null,"html_url":"https://github.com/assemble/assemble-fs","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-fs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-fs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-fs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/assemble%2Fassemble-fs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/assemble","download_url":"https://codeload.github.com/assemble/assemble-fs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247716360,"owners_count":20984227,"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","assemble-pipeline-plugin","fs","vinyl"],"created_at":"2024-11-06T06:05:00.015Z","updated_at":"2025-04-07T19:31:55.174Z","avatar_url":"https://github.com/assemble.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# assemble-fs [![NPM version](https://img.shields.io/npm/v/assemble-fs.svg?style=flat)](https://www.npmjs.com/package/assemble-fs) [![NPM monthly downloads](https://img.shields.io/npm/dm/assemble-fs.svg?style=flat)](https://npmjs.org/package/assemble-fs) [![NPM total downloads](https://img.shields.io/npm/dt/assemble-fs.svg?style=flat)](https://npmjs.org/package/assemble-fs) [![Linux Build Status](https://img.shields.io/travis/assemble/assemble-fs.svg?style=flat\u0026label=Travis)](https://travis-ci.org/assemble/assemble-fs)\n\n\u003e Light wrapper for vinyl-fs to add streams support in a way that plays nice with Assemble middleware.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save assemble-fs\n```\n\n## Heads up!\n\nMajor breaking changes in v2.0 of this plugin! [See the Release History](#release-history) for details.\n\n## Usage\n\n```js\nconst Assemble = require('assemble');\n\n// create your application and add the plugin\nconst app = new Assemble();\napp.use(require('assemble-fs'))\n\n// now you can use `src` and `dest`\napp.src(['foo/*.hbs'])\n  .pipe(app.dest('site/'));\n```\n\n## API\n\nAdds the following methods to your [assemble](https://github.com/assemble/assemble) instance (works with any [Templates][] application):\n\n### [.copy](index.js#L43)\n\nCopy files with the given glob `patterns` to the specified `dest`.\n\n**Params**\n\n* `patterns` **{String|Array}**: Glob patterns of files to copy.\n* `dest` **{String|Function}**: Desination directory.\n* `returns` **{Stream}**: Stream, to continue processing if necessary.\n\n**Example**\n\n```js\napp.task('assets', function(cb) {\n  app.copy('assets/**', 'dist/')\n    .on('error', cb)\n    .on('finish', cb)\n});\n```\n\n### [.src](index.js#L60)\n\nGlob patterns or filepaths to source files.\n\n**Params**\n\n* `glob` **{String|Array}**: Glob patterns or file paths to source files.\n* `options` **{Object}**: Options or locals to merge into the context and/or pass to `src` plugins\n\n**Example**\n\n```js\napp.src('src/*.hbs', {layout: 'default'});\n```\n\n### [.symlink](index.js#L80)\n\nGlob patterns or paths for symlinks.\n\n**Params**\n\n* `glob` **{String|Array}**\n\n**Example**\n\n```js\napp.symlink('src/**');\n```\n\n### [.dest](index.js#L95)\n\nSpecify a destination for processed files. Runs `.preWrite` and `.postWrite` middleware handlers on all files.\n\n**Params**\n\n* `dest` **{String|Function}**: File path or rename function.\n* `options` **{Object}**: Options and locals to pass to `dest` plugins\n\n**Example**\n\n```js\napp.dest('dist/');\n```\n\n## Release History\n\n**v2.0.0**\n\n* Major breaking changes based on v1.0 of Assemble! Requires Assemble v1.0 or above.\n\n**v0.6.0**\n\n* emit `end` on `app` when stream ends\n\n**v0.3.0**\n\n* breaking change! plugin is wrapped in a function that now be called when registered. e.g. `fs()`. This is to be consistent with assemble's plugin guidelines, and allows the plugin to be auto-loaded following the same format as other plugins.\n* rename `files` array to `streamFiles`\n* adds `onStream` middleware handler to `src`\n* adds `preWrite` middleware handler to `dest`\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\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\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\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\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n* [generate](https://www.npmjs.com/package/generate): Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the… [more](https://github.com/generate/generate) | [homepage](https://github.com/generate/generate \"Command line tool and developer framework for scaffolding out new GitHub projects. Generate offers the robustness and configurability of Yeoman, the expressiveness and simplicity of Slush, and more powerful flow control and composability than either.\")\n* [update](https://www.npmjs.com/package/update): Be scalable! Update is a new, open source developer framework and CLI for automating updates… [more](https://github.com/update/update) | [homepage](https://github.com/update/update \"Be scalable! Update is a new, open source developer framework and CLI for automating updates of any kind in code projects.\")\n* [verb](https://www.npmjs.com/package/verb): Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used… [more](https://github.com/verbose/verb) | [homepage](https://github.com/verbose/verb \"Documentation generator for GitHub projects. Verb is extremely powerful, easy to use, and is used on hundreds of projects of all sizes to generate everything from API docs to readmes.\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 100 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 11  | [doowb](https://github.com/doowb) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on December 11, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fassemble-fs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fassemble%2Fassemble-fs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fassemble%2Fassemble-fs/lists"}