carto.js/grunt/tasks/exorcise.js
2020-06-13 18:34:34 +08:00

25 lines
588 B
JavaScript

var bundles = require('./_browserify-bundles');
// Extracts inlined source map from files (browserify bundles in this case).
// Expected to be run after browserify task
exports.task = function() {
var files = {};
for (var bundleName in bundles) {
if (!/tmp|specs/.test(bundleName)) {
var bundleDest = bundles[bundleName].dest;
var mapDest = bundleDest.replace('.js', '.map');
files[mapDest] = bundleDest;
}
}
return {
bundle: {
options: {
strict: true // fail task if sourcemaps are missing
},
files: files
}
};
};