{"_id":"@gulp-sourcemaps/map-sources","_rev":"68090","name":"@gulp-sourcemaps/map-sources","description":"Gulp plugin for mapping sources of a sourcemap.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"floridoo","email":"florian.reiterer@gmail.com"},{"name":"nmccready","email":"nemtcan@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"time":{"modified":"2021-06-03T10:22:36.000Z","created":"2017-03-23T23:05:49.383Z","1.0.0":"2017-03-23T23:05:49.383Z"},"users":{"nmccready":true,"ham2yagi":true},"author":{"name":"Gulp-sourcemaps Team"},"repository":{"type":"git","url":"git+https://github.com/gulp-sourcemaps/map-sources.git"},"versions":{"1.0.0":{"name":"@gulp-sourcemaps/map-sources","version":"1.0.0","description":"Gulp plugin for mapping sources of a sourcemap.","author":{"name":"Gulp-sourcemaps Team"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulp-sourcemaps/map-sources.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint . && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"normalize-path":"^2.0.1","through2":"^2.0.3"},"devDependencies":{"eslint":"^1.7.3","eslint-config-gulp":"^2.0.0","expect":"^1.19.0","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.3.5","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^2.4.5","vinyl":"^2.0.1"},"keywords":["sourcemap","sources","stream"],"gitHead":"a4d4da4229ab3f60d7a3ef142673af8f5180fd3e","bugs":{"url":"https://github.com/gulp-sourcemaps/map-sources/issues"},"homepage":"https://github.com/gulp-sourcemaps/map-sources#readme","_id":"@gulp-sourcemaps/map-sources@1.0.0","_shasum":"890ae7c5d8c877f6d384860215ace9d7ec945bda","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"gulp-sourcemaps","email":"blaine.bublitz+gulp-sourcemaps@gmail.com"},"dist":{"shasum":"890ae7c5d8c877f6d384860215ace9d7ec945bda","size":2261,"noattachment":false,"key":"/@gulp-sourcemaps/map-sources/-/@gulp-sourcemaps/map-sources-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@gulp-sourcemaps/map-sources/download/@gulp-sourcemaps/map-sources-1.0.0.tgz"},"maintainers":[{"name":"floridoo","email":"florian.reiterer@gmail.com"},{"name":"nmccready","email":"nemtcan@gmail.com"},{"name":"phated","email":"blaine.bublitz@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/map-sources-1.0.0.tgz_1490310349159_0.6816919834818691"},"directories":{},"publish_time":1490310349383,"_cnpm_publish_time":1490310349383,"_hasShrinkwrap":false}},"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","_attachments":{},"homepage":"https://github.com/gulp-sourcemaps/map-sources#readme","bugs":{"url":"https://github.com/gulp-sourcemaps/map-sources/issues"},"license":"MIT"}