fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.3 KiB

const Concat = require("concat-with-sourcemaps");
const { resolve } = require("path");
const fs = require("fs");
function unionJs(filenames) {
const filename = filenames[0];
var concat = new Concat(true, filename, "\n");
filenames.forEach(filename => {
concat.add(
filename,
fs.readFileSync(resolve(__dirname, `../../dist/${filename}`)),
fs.readFileSync(resolve(__dirname, `../../dist/${filename}.map`)).toString()
);
});
const filenameParts = filename.split("/");
concat.add(null, `//# sourceMappingURL=${filenameParts[filenameParts.length - 1]}.map`);
var concatenatedContent = concat.content;
var sourceMapForContent = concat.sourceMap;
fs.writeFileSync(resolve(__dirname, "../../dist", filename), concatenatedContent, {
encoding: "utf8",
});
fs.writeFileSync(resolve(__dirname, "../../dist", `${filename}.map`), sourceMapForContent, {
encoding: "utf8",
});
}
unionJs(["bundle.min.js", "fineui.typescript.js"]);
unionJs(["bundle.ie.min.js", "fineui.typescript.ie.js"]);
unionJs(["fineui.min.js", "fineui.typescript.js"]);
unionJs(["fineui.ie.min.js", "fineui.typescript.ie.js"]);
unionJs(["2.0/fineui.min.js", "fineui.typescript.js"]);
unionJs(["2.0/fineui.ie.min.js", "fineui.typescript.ie.js"]);