Gulp plugin for changing the file property of a sourcemap.
Last updated 4 years ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @gulp-sourcemaps/map-file 
SYNC missed versions from official npm registry.


NPM version Downloads Build Status AppVeyor Build Status Coveralls Status

Gulp plugin for changing the file property of a sourcemap.


var mapFile = require('@gulp-sourcemaps/map-file');

  .pipe(mapFile(function(filePath, file) {
    return '../' + filePath;



Takes a map function as the only argument. Returns an objectMode Transform stream.

mapFn(filePath, file)

The map function is called once per each Vinyl object passed through the stream that contains a sourcemap. The map function is called with the filePath string from the file property of the sourcemap and the file object it originated from. The return value replaces the original value.

If a Vinyl object doesn't have a sourceMap property, the file is passed through the stream without having the mapFn called. If the sourceMap.file property doesn't exist, filePath will be undefined.

All file properties are normalized to use / instead of \\ as path separators.



Current Tags

  • 1.0.0                                ...           latest (4 years ago)

1 Versions

  • 1.0.0                                ...           4 years ago
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (2)
Dev Dependencies (10)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |