carto.js/grunt/tasks/terser.js

30 lines
575 B
JavaScript
Raw Permalink Normal View History

2020-06-13 18:34:34 +08:00
var bundles = require('./_browserify-bundles');
/**
* Manger-compressor for CARTO.js ES6+ compliant
*
*/
module.exports = {
task: function() {
var cfg = {};
for (var bundleName in bundles) {
if (!/tmp|specs/.test(bundleName)) {
var files = {};
var src = bundles[bundleName].dest;
var uglifiedDest = src.replace('.uncompressed', '');
files[uglifiedDest] = src;
cfg[bundleName] = {
options: {
sourceMap: true
},
files: files
}
}
}
return cfg;
}
}