{"name":"vinyl-sourcemap","version":"1.1.0","description":"Add/write sourcemaps to/from Vinyl files.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Robin Venneman"},{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/vinyl-sourcemap.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js","lib/"],"scripts":{"lint":"eslint index.js lib/ test/add.js test/write.js && jscs index.js lib/ test/add.js test/write.js","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"append-buffer":"^1.0.2","convert-source-map":"^1.5.0","graceful-fs":"^4.1.6","normalize-path":"^2.1.1","now-and-later":"^2.0.0","remove-bom-buffer":"^3.0.0","vinyl":"^2.0.0"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0"},"keywords":["vinyl","sourcemap","gulp"],"gitHead":"4121a96458f1f78709411b083655c520a679e49e","bugs":{"url":"https://github.com/gulpjs/vinyl-sourcemap/issues"},"homepage":"https://github.com/gulpjs/vinyl-sourcemap#readme","_id":"vinyl-sourcemap@1.1.0","_shasum":"92a800593a38703a8cdb11d8b300ad4be63b3e16","_from":".","_npmVersion":"2.15.1","_nodeVersion":"0.10.48","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"}],"dist":{"shasum":"92a800593a38703a8cdb11d8b300ad4be63b3e16","tarball":"http://registry-npm.ywwl.com/vinyl-sourcemap/download/vinyl-sourcemap-1.1.0.tgz","npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2/wtCRA9TVsSAnZWagAAYJYP/RJPm2SnFrDPSNw+4hHG\n/wBBVjPLmldGBBV0B8HsBBLaxakLOcBZWFBo66ws3vIyITHMcGvgS8TcbQfj\nSpWUXkEZaGQHfVyXhs4Xaf6UkZVm2jtri92QnLGbWfDlSLDBHzTDJZSTBdsw\nF94okVIJ2fK//ZLDP/MSgCrNZu5BV36v36xofMonWUEjWWCku2Nzy8ndQnZE\nnZ6qxjVjkyKRhaT0ZRWKdVdI86Bht9IPRRAdz7710tfnkV5YTUrsv+enfoXx\nHO6MeljOnOJriQ2sAtBH7q+PASIqCp3kK5dDSI+OyP+gIfgBcgvNy3nn4CE8\nv4gpi6Q6q2QvjbucH0mRVz/pIrWVDADjToHwUDeBPBYXqnelXuogX/FfJ/S2\n1pr9OW8J4ZtJxqwukqVWhhFFZxF/8L4/nSHgnGx08cD1vMgOQNUfsLWcAG9B\nWRNfvhWZoydUzSExdQti4ag57Tc37PZLkDCwXjW34idCXeslURdDfgsYas3G\nW/cQGUogwooWJwlJOsKm0CRfF7eOZnZcgxVXngrZbfiRdzvoNOiT3clA0Et4\nrFODsjp7G4x9VhWNajUnkVuvU6vWv45bnIKn/1NyzhHc9nC01KfPwSIoUNrs\n9U5m+3cF7J19LuBwbaZPB7EduUwp9VNU/O02CAZR9Wn7uA5fxZgTBTM3VK7w\nfN7+\r\n=O088\r\n-----END PGP SIGNATURE-----\r\n","integrity":"sha512-NiibMgt6VJGJmyw7vtzhctDcfKch4e4n9TBeoWlirb7FMg9/1Ov9k+A5ZRAtywBpRPiyECvQRQllYM8dECegVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBH9rdvkTBW2iIWiHGmr3bEFIFDAa35Nnyqj54+dZtXwIhAP/4oVExJNGhi4lj0cr6a4lu2vLttKt5LfkI2RCCnvl6"}],"size":4913,"noattachment":false,"key":"/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vinyl-sourcemap-1.1.0.tgz_1501616166889_0.9932172652333975"},"directories":{},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# vinyl-sourcemap\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nAdd/write sourcemaps to/from Vinyl files.\n\n## Usage\n\n```js\nsourcemap.add(file, function (err, updatedFile) {\n  // updatedFile will have a .sourceMap property\n});\n\n// The 2nd argument can be given as a path string\nsourcemap.write(file, './maps', function (err, updatedFile, sourcemapFile) {\n  // sourcemapFile will be a Vinyl file to be written to some location\n  // updatedFile will have the .contents property updated with a sourceMappingURL that resolves to sourcemapFile\n});\n\n// If not defined, the sourcemap is inlined\nsourcemap.write(file, function (err, updatedFile, sourcemapFile) {\n  // sourcemapFile is undefined\n  // updatedFile will have the .contents property updated with a sourceMappingURL that is an inlined sourcemap\n});\n```\n\n## API\n\n### `sourcemap.add(file, callback)`\n\nTakes a [Vinyl][vinyl] `file` object and a `callback` function. It attempts to parse an inline sourcemap or load an external sourcemap for the file. If a valid sourcemap is found, the `sources` & `sourcesContent` properties are resolved to actual files (if possible) and a fully resolved sourcemap is attached as `file.sourceMap`. If a sourcemap is not found, a stub sourcemap is generated for the file and attached as `file.sourceMap`.\n\nOnce all resolution is complete, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. **Note:** The original file is mutated but `updatedFile` is passed to the callback as a convenience.\n\nIf the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`.\n\nIf the `file` has a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file.\n\nAll filesystem operations are optional & non-fatal so any errors will not be bubbled to the `callback`.\n\n### `sourcemap.write(file, [outputPath,] callback)`\n\nTakes a [Vinyl][vinyl] `file` object, (optionally) an `outputPath` string and a `callback` function.\n\nIf `outputPath` is not passed, an inline sourcemap will be generated from the `file.sourceMap` property and appended to the `file.contents`. Once the inline sourcemap is appended, the `callback(err, updatedFile)` is called with the `updatedFile`. If an error occurs, it will be passed as `err` and `updatedFile` will be undefined. **Note:** The original file is mutated but `updatedFile` is passed to the callback as a convenience.\n\nIf `outputPath` is passed, a new Vinyl file will be generated using `file.cwd` and `file.base` from the original file, the path to the external sourcemap, and the `file.sourceMap` (as contents). The external location will be appended to the `file.contents` of the original file. Once the new file is created and location appended, the `callback(err, updatedFile, sourcemapFile)` is called with the `updatedFile` and the `sourcemapFile`. If an error occurs, it will be passed as `err` and `updatedFile`/`sourcemapFile` will be undefined. **Note:** The original file is mutated but `updatedFile` is passed to the callback as a convenience.\n\nIf the `file` is not a Vinyl object or the contents are streaming, an Error will be passed to the `callback`.\n\nIf the `file` doesn't have a `.sourceMap` property or the contents are null, the `callback` will be called immediately without mutation to the file.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/vinyl-sourcemap.svg?style=flat-square\n[npm-url]: https://npmjs.com/package/vinyl-sourcemap\n[npm-image]: https://img.shields.io/npm/v/vinyl-sourcemap.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/vinyl-sourcemap/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/vinyl-sourcemap/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/vinyl-sourcemap\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/vinyl-sourcemap/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n\n<!-- prettier-ignore-start -->\n[vinyl]: https://github.com/gulpjs/vinyl\n<!-- prettier-ignore-end -->\n","publish_time":1501616166962,"_cnpm_publish_time":1501616166962,"dist-tags":{"latest":"2.0.0"}}