{ "_args": [ [ { "raw": "vinyl@^0.5.0", "scope": null, "escapedName": "vinyl", "name": "vinyl", "rawSpec": "^0.5.0", "spec": ">=0.5.0 <0.6.0", "type": "range" }, "/home/jdaugherty/work/GT2/GT2-Android/node_modules/gulp-util" ] ], "_from": "vinyl@>=0.5.0 <0.6.0", "_id": "vinyl@0.5.3", "_inCache": true, "_location": "/vinyl", "_nodeVersion": "2.5.0", "_npmUser": { "name": "fractal", "email": "contact@wearefractal.com" }, "_npmVersion": "2.13.4", "_phantomChildren": {}, "_requested": { "raw": "vinyl@^0.5.0", "scope": null, "escapedName": "vinyl", "name": "vinyl", "rawSpec": "^0.5.0", "spec": ">=0.5.0 <0.6.0", "type": "range" }, "_requiredBy": [ "/gulp-util" ], "_resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", "_shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", "_shrinkwrap": null, "_spec": "vinyl@^0.5.0", "_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/gulp-util", "author": { "name": "Fractal", "email": "contact@wearefractal.com", "url": "http://wearefractal.com/" }, "bugs": { "url": "https://github.com/wearefractal/vinyl/issues" }, "dependencies": { "clone": "^1.0.0", "clone-stats": "^0.0.1", "replace-ext": "0.0.1" }, "description": "A virtual file format", "devDependencies": { "buffer-equal": "0.0.1", "event-stream": "^3.1.0", "istanbul": "^0.3.0", "istanbul-coveralls": "^1.0.1", "jshint": "^2.4.1", "lodash.templatesettings": "^3.1.0", "mocha": "^2.0.0", "rimraf": "^2.2.5", "should": "^7.0.0" }, "directories": {}, "dist": { "shasum": "b0455b38fc5e0cf30d4325132e461970c2091cde", "tarball": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz" }, "engines": { "node": ">= 0.9" }, "files": [ "index.js", "lib" ], "gitHead": "6f19648bd67040bfd0dc755ad031e1e5e0b58429", "homepage": "http://github.com/wearefractal/vinyl", "license": "MIT", "main": "./index.js", "maintainers": [ { "name": "fractal", "email": "contact@wearefractal.com" }, { "name": "phated", "email": "blaine@iceddev.com" } ], "name": "vinyl", "optionalDependencies": {}, "readme": "# vinyl [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Dependency Status](https://david-dm.org/wearefractal/vinyl.png?theme=shields.io)](https://david-dm.org/wearefractal/vinyl)\n## Information\n











Packagevinyl
DescriptionA virtual file format
Node Version>= 0.9
\n\n## What is this?\nRead this for more info about how this plays into the grand scheme of things [https://medium.com/@eschoff/3828e8126466](https://medium.com/@eschoff/3828e8126466)\n\n## File\n\n```javascript\nvar File = require('vinyl');\n\nvar coffeeFile = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\",\n contents: new Buffer(\"test = 123\")\n});\n```\n\n### isVinyl\nWhen checking if an object is a vinyl file, you should not use instanceof. Use the isVinyl function instead.\n\n```js\nvar File = require('vinyl');\n\nvar dummy = new File({stuff});\nvar notAFile = {};\n\nFile.isVinyl(dummy); // true\nFile.isVinyl(notAFile); // false\n```\n\n### constructor(options)\n#### options.cwd\nType: `String`

Default: `process.cwd()`\n\n#### options.base\nUsed for relative pathing. Typically where a glob starts.\n\nType: `String`

Default: `options.cwd`\n\n#### options.path\nFull path to the file.\n\nType: `String`

Default: `undefined`\n\n#### options.history\nPath history. Has no effect if `options.path` is passed.\n\nType: `Array`

Default: `options.path ? [options.path] : []`\n\n#### options.stat\nThe result of an fs.stat call. See [fs.Stats](http://nodejs.org/api/fs.html#fs_class_fs_stats) for more information.\n\nType: `fs.Stats`

Default: `null`\n\n#### options.contents\nFile contents.\n\nType: `Buffer, Stream, or null`

Default: `null`\n\n### isBuffer()\nReturns true if file.contents is a Buffer.\n\n### isStream()\nReturns true if file.contents is a Stream.\n\n### isNull()\nReturns true if file.contents is null.\n\n### clone([opt])\nReturns a new File object with all attributes cloned.
By default custom attributes are deep-cloned.\n\nIf opt or opt.deep is false, custom attributes will not be deep-cloned.\n\nIf opt.contents is false, it will copy file.contents Buffer's reference.\n\n### pipe(stream[, opt])\nIf file.contents is a Buffer, it will write it to the stream.\n\nIf file.contents is a Stream, it will pipe it to the stream.\n\nIf file.contents is null, it will do nothing.\n\nIf opt.end is false, the destination stream will not be ended (same as node core).\n\nReturns the stream.\n\n### inspect()\nReturns a pretty String interpretation of the File. Useful for console.log.\n\n### contents\nThe [Stream](https://nodejs.org/api/stream.html#stream_stream) or [Buffer](https://nodejs.org/api/buffer.html#buffer_class_buffer) of the file as it was passed in via options, or as the result of modification.\n\nFor example:\n\n```js\nif (file.isBuffer()) {\n console.log(file.contents.toString()); // logs out the string of contents\n}\n```\n\n### path\nAbsolute pathname string or `undefined`. Setting to a different value pushes the old value to `history`.\n\n### history\nArray of `path` values the file object has had, from `history[0]` (original) through `history[history.length - 1]` (current). `history` and its elements should normally be treated as read-only and only altered indirectly by setting `path`.\n\n### relative\nReturns path.relative for the file base and file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.relative); // file.coffee\n```\n\n### dirname\nGets and sets path.dirname for the file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.dirname); // /test\n\nfile.dirname = '/specs';\n\nconsole.log(file.dirname); // /specs\nconsole.log(file.path); // /specs/file.coffee\n`\n```\n\n### basename\nGets and sets path.basename for the file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.basename); // file.coffee\n\nfile.basename = 'file.js';\n\nconsole.log(file.basename); // file.js\nconsole.log(file.path); // /test/file.js\n`\n```\n\n### extname\nGets and sets path.extname for the file path.\n\nExample:\n\n```javascript\nvar file = new File({\n cwd: \"/\",\n base: \"/test/\",\n path: \"/test/file.coffee\"\n});\n\nconsole.log(file.extname); // .coffee\n\nfile.extname = '.js';\n\nconsole.log(file.extname); // .js\nconsole.log(file.path); // /test/file.js\n`\n```\n\n[npm-url]: https://npmjs.org/package/vinyl\n[npm-image]: https://badge.fury.io/js/vinyl.png\n[travis-url]: https://travis-ci.org/wearefractal/vinyl\n[travis-image]: https://travis-ci.org/wearefractal/vinyl.png?branch=master\n[coveralls-url]: https://coveralls.io/r/wearefractal/vinyl\n[coveralls-image]: https://coveralls.io/repos/wearefractal/vinyl/badge.png\n[depstat-url]: https://david-dm.org/wearefractal/vinyl\n[depstat-image]: https://david-dm.org/wearefractal/vinyl.png\n", "readmeFilename": "README.md", "repository": { "type": "git", "url": "git://github.com/wearefractal/vinyl.git" }, "scripts": { "coveralls": "istanbul cover _mocha && istanbul-coveralls", "test": "mocha && jshint lib" }, "version": "0.5.3" }