{"_id":"vinyl-fs-browser","_rev":"4645634","name":"vinyl-fs-browser","description":"Vinyl adapter for the file system","dist-tags":{"latest":"2.1.1-1"},"maintainers":[{"name":"jbenet","email":""},{"name":"mappum","email":""}],"time":{"modified":"2026-04-10T20:15:19.000Z","created":"2015-08-14T16:18:06.050Z","2.1.1-1":"2015-10-02T04:28:46.715Z","0.1.0":"2015-08-14T16:18:06.050Z"},"users":{},"author":"","repository":{"type":"git","url":"git://github.com/jbenet/vinyl-fs.git"},"versions":{"2.1.1-1":{"name":"vinyl-fs-browser","description":"Vinyl adapter for the file system","version":"2.1.1-1","homepage":"http://github.com/jbenet/vinyl-fs","repository":{"type":"git","url":"git://github.com/jbenet/vinyl-fs.git"},"author":"","browserify":{"transform":["brfs"]},"main":"./index.js","files":["index.js","lib"],"dependencies":{"brfs":"^1.4.1","duplexify":"^3.2.0","glob-stream":"^5.0.0","graceful-fs":"^4.0.0","gulp-sourcemaps":"^1.5.2","is-valid-glob":"^0.3.0","merge-stream":"^1.0.0","mkdirp":"^0.5.0","object-assign":"^4.0.0","strip-bom":"^2.0.0","strip-bom-stream":"^1.0.0","through2":"^2.0.0","through2-filter":"^2.0.0","vinyl":"^1.0.0"},"devDependencies":{"buffer-equal":"^0.0.1","istanbul":"^0.3.0","istanbul-coveralls":"^1.0.1","jshint":"^2.4.1","mocha":"^2.0.0","mocha-lcov-reporter":"^1.0.0","rimraf":"^2.2.5","should":"^7.0.0","sinon":"^1.10.3"},"scripts":{"test":"jshint lib && mocha","coveralls":"istanbul cover _mocha && istanbul-coveralls"},"engines":{"node":">=0.10"},"license":"MIT","bugs":{"url":"https://github.com/wearefractal/vinyl-fs/issues"},"directories":{"test":"test"},"gitHead":"b33e07b57a75e89738fdea64c9c2418ef6c26446","_id":"vinyl-fs-browser@2.1.1-1","_shasum":"ae165522a3743e9b19496d0b555b2bf5d068c258","_from":".","_npmVersion":"3.3.5","_nodeVersion":"4.1.1","_npmUser":{"name":"mappum","email":"mappum@gmail.com"},"dist":{"shasum":"ae165522a3743e9b19496d0b555b2bf5d068c258","size":6749,"noattachment":false,"key":"/vinyl-fs-browser/-/vinyl-fs-browser-2.1.1-1.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-fs-browser/download/vinyl-fs-browser-2.1.1-1.tgz"},"maintainers":[{"name":"jbenet","email":""},{"name":"mappum","email":""}],"_cnpmcore_publish_time":"2021-12-23T20:00:33.653Z","publish_time":1443760126715,"_cnpm_publish_time":1443760126715},"0.1.0":{"name":"vinyl-fs-browser","description":"Vinyl adapter for the file system","version":"0.1.0","homepage":"http://github.com/jbenet/vinyl-fs","repository":{"type":"git","url":"git://github.com/jbenet/vinyl-fs.git"},"author":"","browserify":{"transform":["brfs"]},"main":"./index.js","files":["index.js","lib"],"dependencies":{"brfs":"^1.4.1","duplexify":"^3.2.0","glob-stream":"^5.0.0","glob-watcher":"^2.0.0","is-valid-glob":"^0.3.0","merge-stream":"^0.1.7","mkdirp":"^0.5.0","object-assign":"^3.0.0","through2":"^2.0.0","through2-filter":"^2.0.0","vinyl":"^0.5.0"},"devDependencies":{"buffer-equal":"^0.0.1","istanbul":"^0.3.0","istanbul-coveralls":"^1.0.1","jshint":"^2.4.1","mocha":"^2.0.0","mocha-lcov-reporter":"^0.0.2","rimraf":"^2.2.5","should":"^7.0.0","sinon":"^1.10.3"},"scripts":{"test":"jshint lib && mocha","coveralls":"istanbul cover _mocha && istanbul-coveralls"},"engines":{"node":">=0.10"},"license":"MIT","bugs":{"url":"https://github.com/wearefractal/vinyl-fs/issues"},"directories":{"test":"test"},"gitHead":"9188c918449dea7a73a0d8c3aa801d1217c602cf","_id":"vinyl-fs-browser@0.1.0","_shasum":"9985705a1ce61341c6a23ff91b7811b74fd8b33d","_from":".","_npmVersion":"2.12.1","_nodeVersion":"3.0.0","_npmUser":{"name":"jbenet","email":"juan@benet.ai"},"dist":{"shasum":"9985705a1ce61341c6a23ff91b7811b74fd8b33d","size":6022,"noattachment":false,"key":"/vinyl-fs-browser/-/vinyl-fs-browser-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/vinyl-fs-browser/download/vinyl-fs-browser-0.1.0.tgz"},"maintainers":[{"name":"jbenet","email":""},{"name":"mappum","email":""}],"_cnpmcore_publish_time":"2021-12-23T20:00:32.783Z","publish_time":1439569086050,"_cnpm_publish_time":1439569086050}},"readme":"# vinyl-fs [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status][depstat-image]][depstat-url]\n## Information\n<table><br><tr><br><td>Package</td><td>vinyl-fs</td><br></tr><br><tr><br><td>Description</td><br><td>Vinyl adapter for the file system</td><br></tr><br><tr><br><td>Node Version</td><br><td>>= 0.10</td><br></tr><br></table>  \n\n## Usage\n\n```javascript\nvar map = require('map-stream');\nvar fs = require('vinyl-fs');\n\nvar log = function(file, cb) {\n  console.log(file.path);\n  cb(null, file);\n};\n\nfs.src(['./js/**/*.js', '!./js/vendor/*.js'])\n  .pipe(map(log))\n  .pipe(fs.dest('./output'));\n```\n\n## API\n### src(globs[, opt])\n- Takes a glob string or an array of glob strings as the first argument.\n- Globs are executed in order, so negations should follow positive globs. For example:\n\n```js\nfs.src(['!b*.js', '*.js'])\n```\n\nwould not exclude any files, but this would\n\n```js\nfs.src(['*.js', '!b*.js'])\n```\n\n- Possible options for the second argument:\n  - cwd - Specify the working directory the folder is relative to.\n    - Default is `process.cwd()`.\n\n  - base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.\n    - Default is where the glob begins if any.\n    - Default is `process.cwd()` if there is no glob.\n\n  - buffer - `true` or `false` if you want to buffer the file.\n    - Default value is `true`.\n    - `false` will make `file.contents` a paused Stream.\n\n  - read - `true` or `false` if you want the file to be read or not. Useful for stuff like `rm`ing files.\n    - Default value is `true`.\n    - `false` will disable writing the file to disk via `.dest()`.\n\n  - since - `Date` or `number` if you only want files that have been modified since the time specified.\n  - stripBOM - `true` or `false` if you want the BOM to be stripped on UTF-8 encoded files.\n    - Default value is `true`.\n\n  - passthrough - `true` or `false` if you want a duplex stream which passes items through and emits globbed files.\n    - Default is `false`.\n\n  - sourcemaps - `true` or `false` if you want files to have sourcemaps enabled.\n    - Default is `false`.\n    - Will load inline sourcemaps and resolve sourcemap links from files\n    - Uses `gulp-sourcemaps` under the hood\n\n  - followSymlinks - `true` if you want to recursively resolve symlinks to their targets; set to `false` to preserve them as symlinks.\n    - Default is `true`.\n    - `false` will make `file.symlink` equal the original symlink's target path.\n\n  - Any glob-related options are documented in [glob-stream] and [node-glob].\n\n- Returns a Readable stream by default, or a Duplex stream if the `passthrough` option is set to `true`.\n- This stream emits matching [vinyl] File objects.\n\n_Note:_ UTF-8 BOM will be stripped from all UTF-8 files read with `.src`.\n\n### dest(folder[, opt])\n- Takes a folder path as the first argument.\n- First argument can also be a function that takes in a file and returns a folder path.\n- Possible options for the second argument:\n  - cwd - Specify the working directory the folder is relative to.\n    - Default is `process.cwd()`.\n\n  - base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.\n    - Default is the `cwd` resolves to the folder path.\n    - Can also be a function that takes in a file and returns a folder path.\n\n  - mode - Specify the mode the files should be created with.\n    - Default is the mode of the input file (file.stat.mode) if any.\n    - Default is the process mode if the input file has no mode property.\n\n  - dirMode - Specify the mode the directory should be created with.\n    - Default is the process mode.\n\n  - overwrite - Specify if existing files with the same path should be overwritten or not.\n    - Default is `true`, to always overwrite existing files.\n    - Can also be a function that takes in a file and returns `true` or `false`.\n\n  - sourcemaps -\n    - Default is `null` aka do not write sourcemaps.\n    - Uses `gulp-sourcemaps` under the hood\n    - Examples:\n      - Write as inline comments\n      - fs.dest('./', {sourcemaps: true})\n      - Write as files in the same folder\n      - fs.dest('./', {<br>  sourcemaps: {<br>    path: '.'<br>  }<br>})\n      - Any other options are passed through to `gulp-sourcemaps`\n      - fs.dest('./', {<br>  sourcemaps: {<br>    path: '.',<br>    addComment: false,<br>    includeContent: false<br>  }<br>})\n\n- Returns a Readable/Writable stream.\n- On write the stream will save the [vinyl] File to disk at the folder/cwd specified.\n- After writing the file to disk, it will be emitted from the stream so you can keep piping these around.\n- If the file has a `symlink` attribute specifying a target path, then a symlink will be created.\n- The file will be modified after being written to this stream:\n  - `cwd`, `base`, and `path` will be overwritten to match the folder.\n  - `stat.mode` will be overwritten if you used a mode parameter.\n  - `contents` will have it's position reset to the beginning if it is a stream.\n\n### symlink(folder[, opt])\n- Takes a folder path as the first argument.\n- First argument can also be a function that takes in a file and returns a folder path.\n- Possible options for the second argument:\n  - cwd - Specify the working directory the folder is relative to.\n    - Default is `process.cwd()`.\n\n  - base - Specify the folder relative to the cwd. This is used to determine the file names when saving in `.dest()`.\n    - Default is the `cwd` resolves to the folder path.\n    - Can also be a function that takes in a file and returns a folder path.\n\n  - dirMode - Specify the mode the directory should be created with.\n    - Default is the process mode.\n\n- Returns a Readable/Writable stream.\n- On write the stream will create a symbolic link (i.e. symlink) on disk at the folder/cwd specified.\n- After creating the symbolic link, it will be emitted from the stream so you can keep piping these around.\n- The file will be modified after being written to this stream:\n  - `cwd`, `base`, and `path` will be overwritten to match the folder.\n\n[glob-stream]: https://github.com/wearefractal/glob-stream\n[node-glob]: https://github.com/isaacs/node-glob\n[gaze]: https://github.com/shama/gaze\n[glob-watcher]: https://github.com/wearefractal/glob-watcher\n[vinyl]: https://github.com/wearefractal/vinyl\n[npm-url]: https://www.npmjs.com/package/vinyl-fs\n[npm-image]: https://badge.fury.io/js/vinyl-fs.svg\n[travis-url]: https://travis-ci.org/wearefractal/vinyl-fs\n[travis-image]: https://travis-ci.org/wearefractal/vinyl-fs.svg?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl-fs\n[coveralls-image]: https://img.shields.io/coveralls/wearefractal/vinyl-fs.svg?style=flat\n[depstat-url]: https://david-dm.org/wearefractal/vinyl-fs\n[depstat-image]: https://david-dm.org/wearefractal/vinyl-fs.svg\n","_attachments":{},"homepage":"http://github.com/jbenet/vinyl-fs","bugs":{"url":"https://github.com/wearefractal/vinyl-fs/issues"},"license":"MIT"}