{"_id":"@gulp-sourcemaps/map-sources","_rev":"10-2958e1910c1ceb2bdd729ca9dfe823a4","name":"@gulp-sourcemaps/map-sources","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@gulp-sourcemaps/map-sources","version":"1.0.0","keywords":["sourcemap","sources","stream"],"author":{"name":"Gulp-sourcemaps Team"},"license":"MIT","_id":"@gulp-sourcemaps/map-sources@1.0.0","maintainers":[{"name":"gulp-sourcemaps","email":"blaine.bublitz+gulp-sourcemaps@gmail.com"}],"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"homepage":"https://github.com/gulp-sourcemaps/map-sources#readme","bugs":{"url":"https://github.com/gulp-sourcemaps/map-sources/issues"},"dist":{"shasum":"890ae7c5d8c877f6d384860215ace9d7ec945bda","tarball":"https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz","integrity":"sha512-o/EatdaGt8+x2qpb0vFLC/2Gug/xYPRXb6a+ET1wGYKozKN3krDWC/zZFZAtrzxJHuDL12mwdfEFKcKMNvc55A==","signatures":[{"sig":"MEUCIQCZcaDuZm1k7TlX4xBAP14m90f/x9LITIaXG0ebo3fsRQIgTd1hRp5rtz9RwE9Cmj63k8SlXx7WlGw/QWrbwA5/xvg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","files":["LICENSE","index.js"],"_shasum":"890ae7c5d8c877f6d384860215ace9d7ec945bda","engines":{"node":">= 0.10"},"gitHead":"a4d4da4229ab3f60d7a3ef142673af8f5180fd3e","scripts":{"lint":"eslint . && jscs index.js test/","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","pretest":"npm run lint","coveralls":"npm run cover && istanbul-coveralls"},"_npmUser":{"name":"gulp-sourcemaps","email":"blaine.bublitz+gulp-sourcemaps@gmail.com"},"repository":{"url":"git+https://github.com/gulp-sourcemaps/map-sources.git","type":"git"},"_npmVersion":"2.15.2","description":"Gulp plugin for mapping sources of a sourcemap.","directories":{},"_nodeVersion":"0.10.41","dependencies":{"through2":"^2.0.3","normalize-path":"^2.0.1"},"devDependencies":{"jscs":"^2.3.5","mocha":"^2.4.5","vinyl":"^2.0.1","eslint":"^1.7.3","expect":"^1.19.0","istanbul":"^0.4.3","mississippi":"^1.3.0","jscs-preset-gulp":"^1.0.0","eslint-config-gulp":"^2.0.0","istanbul-coveralls":"^1.0.3"},"_npmOperationalInternal":{"tmp":"tmp/map-sources-1.0.0.tgz_1490310349159_0.6816919834818691","host":"packages-12-west.internal.npmjs.com"}}},"time":{"created":"2017-03-23T23:05:49.383Z","modified":"2026-08-11T18:45:15.203Z","1.0.0":"2017-03-23T23:05:49.383Z"},"bugs":{"url":"https://github.com/gulp-sourcemaps/map-sources/issues"},"author":{"name":"Gulp-sourcemaps Team"},"license":"MIT","homepage":"https://github.com/gulp-sourcemaps/map-sources#readme","keywords":["sourcemap","sources","stream"],"repository":{"url":"git+https://github.com/gulp-sourcemaps/map-sources.git","type":"git"},"description":"Gulp plugin for mapping sources of a sourcemap.","contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"maintainers":[{"email":"blaine.bublitz@gmail.com","name":"phated"}],"readme":"# @gulp-sourcemaps/map-sources\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nGulp plugin for mapping sources of a sourcemap.\n\n## Example\n\n```js\nvar mapSources = require('@gulp-sourcemaps/map-sources');\n\ngulp.src(...)\n  .pipe(sourcemaps.init())\n  .pipe(mapSources(function(sourcePath, file) {\n    return '../' + sourcePath;\n  }))\n  .pipe(sourcemaps.write())\n  .pipe(gulp.dest(...))\n```\n\n## API\n\n### `mapSources(mapFn)`\n\nTakes a map function as the only argument. Returns an `objectMode` Transform stream.\n\n#### `mapFn(sourcePath, file)`\n\nThe map function is called once per value of the `sources` array of a `sourceMap` attached to each [`Vinyl`][vinyl-url] object passed through the stream.  The map function is called with the `sourcePath` string from the `sources` array and the `file` object it originated from.  The return value replaces the original value in the array.\n\nIf a `Vinyl` object doesn't have a `sourceMap` or `sourceMap.sources` property, the file is passed through the stream without having the `mapFn` called.\n\nAll `sources` are normalized to use `/` instead of `\\\\` as path separators.\n\n## License\n\nMIT\n\n[vinyl-url]: https://github.com/gulpjs/vinyl\n\n[downloads-image]: http://img.shields.io/npm/dm/@gulp-sourcemaps/map-sources.svg\n[npm-url]: https://npmjs.org/package/@gulp-sourcemaps/map-sources\n[npm-image]: http://img.shields.io/npm/v/@gulp-sourcemaps/map-sources.svg\n\n[travis-url]: https://travis-ci.org/gulp-sourcemaps/map-sources\n[travis-image]: http://img.shields.io/travis/gulp-sourcemaps/map-sources.svg?label=travis-ci\n\n[appveyor-url]: https://ci.appveyor.com/project/phated/map-sources\n[appveyor-image]: https://img.shields.io/appveyor/ci/phated/map-sources.svg?label=appveyor\n\n[coveralls-url]: https://coveralls.io/r/gulp-sourcemaps/map-sources\n[coveralls-image]: http://img.shields.io/coveralls/gulp-sourcemaps/map-sources.svg\n","readmeFilename":"README.md","users":{"ham2yagi":true,"nmccready":true}}