control-freak-ide/Code/client/tasks/correctSourceMap.js
plastic-hub-dev-node-saturn 538369cff7 latest
2021-05-12 18:35:18 +02:00

13 lines
419 B
JavaScript

module.exports = function (grunt) {
"use strict";
grunt.registerTask("correctSourceMap", function (layerName, buildCfg, outdir) {
var buildConfig = grunt.config(buildCfg);
var path = outdir + buildConfig.layersByName[layerName].outputPath.replace(/\.js$/g, ".map");
var content = grunt.file.read(path);
content = content.replace(/\.\.(\/|\\\\)tmp(\/|\\\\)/g, "");
grunt.file.write(path, content);
});
};