{"id":17445989,"url":"https://github.com/jamen/pull-vinyl","last_synced_at":"2025-09-10T01:45:35.720Z","repository":{"id":65371443,"uuid":"71872597","full_name":"jamen/pull-vinyl","owner":"jamen","description":"Read and write `Vinyl` objects in the file system.","archived":false,"fork":false,"pushed_at":"2017-01-28T03:16:10.000Z","size":39,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-23T11:50:57.785Z","etag":null,"topics":[],"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/jamen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-25T07:49:58.000Z","updated_at":"2023-02-19T08:59:47.000Z","dependencies_parsed_at":"2023-01-19T22:35:17.417Z","dependency_job_id":null,"html_url":"https://github.com/jamen/pull-vinyl","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jamen/pull-vinyl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-vinyl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-vinyl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-vinyl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-vinyl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamen","download_url":"https://codeload.github.com/jamen/pull-vinyl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fpull-vinyl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266813444,"owners_count":23988545,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-17T18:19:45.378Z","updated_at":"2025-07-24T08:10:44.530Z","avatar_url":"https://github.com/jamen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pull-vinyl [![NPM version](https://badge.fury.io/js/pull-vinyl.svg)](https://npmjs.org/package/pull-vinyl) [![Build Status](https://travis-ci.org/jamen/pull-vinyl.svg?branch=master)](https://travis-ci.org/jamen/pull-vinyl)\n\n\u003e Read and write `Vinyl` objects in the file system.\n\n```js\npull(\n  // Read `Vinyl` files\n  vinyl.src('foo/**/*.js'),\n\n  // Transform them somehow, i.e. with a compiler.\n  transformVinyl(),\n\n  // Write them\n  vinyl.dest('output')\n)\n```\n\nReading and writing [`Vinyl`](https://github.com/gulpjs/vinyl) objects to/from the file system with pull streams.  It is inspired from [`vinyl-fs`](https://github.com/gulpjs/vinyl-fs) from gulp.\n\n## Installation\n\n```sh\n$ npm install --save pull-vinyl\n```\n\n## API\n\n### `vinyl.src(pattern, [options])`\n\nRead `Vinyl` objects from the file system with patterns from [`pull-glob`](https://npmjs.com/pull-glob).  You can use `vinyl.read` as an alias.\n\n - `pattern`: A glob pattern resolved by `pull-glob`.\n - `options` (`Object`): Options for reading.\n\nIt works as a [pull stream source](https://github.com/pull-stream/pull-stream#source-aka-readable):\n\n```js\npull(\n  // Resolve glob into `Vinyl` objects.\n  vinyl.src('foo/**/*.js'),\n  // Transform `Vinyl` objects...\n  // Then write them:\n  vinyl.dest('bar')\n)\n```\n\n### `vinyl.dest([base]])`\n\nWrite `Vinyl` objects at the `directory` base.  You can use `vinyl.write` as an alias.\n\n - `base` (`String`): The base directory for the `Vinyl` objects.  Defaults to `file.base`.\n\n```js\npull(\n  // Obtain `Vinyl` objects somehow, probably through reading:\n  vinyl.src('foo/**/*.js'),\n\n  // Transform them before you write them:\n  babel(), // Example stream.\n\n  // Write them to the given directory\n  vinyl.dest('out')\n)\n```\n\n### `vinyl.map(name, [base])`\n\nMaps data into vinyl files.  Essentially [`vinyl-source-stream`](https://npmjs.com/vinyl-source-stream) as a pull-stream.\n\n - `name` (`String`|`Function`): String of file's name, or a function to handle per item.\n - `base` (`String`|`Function`): Optional base directory string, or a function to handle per item.\n\n```js\npull(\n  // Pipe some data:\n  pull.values([ Buffer.from('hello world') ]),\n\n  // Map it to a file:\n  vinyl.map('bar.js', '/foo'),\n\n  // Use it\n  pull.drain(function (file) {\n    console.log(file)\n  })\n)\n```\n\n## License\n\nMIT © [Jamen Marz](https://github.com/jamen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-vinyl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamen%2Fpull-vinyl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fpull-vinyl/lists"}