|
|
@@ -1,10 +1,11 @@
|
|
|
const webpack = require('webpack');
|
|
|
const config = require('../webpack.config');
|
|
|
-
|
|
|
+const fs = require("fs/promises");
|
|
|
+const path = require("path");
|
|
|
function compile() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log('compile jsx start');
|
|
|
- webpack(config({ minimize: false }), (err, stats) => {
|
|
|
+ webpack(config({ minimize: false }), async (err, stats) => {
|
|
|
if (err) {
|
|
|
console.error(err);
|
|
|
reject(err);
|
|
|
@@ -29,7 +30,7 @@ function compile() {
|
|
|
function compileMin() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
console.log('compile jsx with minimize start');
|
|
|
- webpack(config({ minimize: true }), (err, stats) => {
|
|
|
+ webpack(config({ minimize: true }), async (err, stats) => {
|
|
|
if (err) {
|
|
|
console.error(err);
|
|
|
reject(err);
|
|
|
@@ -43,10 +44,11 @@ function compileMin() {
|
|
|
reject(err);
|
|
|
});
|
|
|
}
|
|
|
+ await fs.unlink(path.join(__dirname, "..", 'dist', 'umd', 'semi-ui.min.js.LICENSE.txt'));
|
|
|
console.log('compile jsx with minimize success');
|
|
|
resolve();
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-compile().then(compileMin);
|
|
|
+compile().then(compileMin);
|