mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: add polyfill
This commit is contained in:
7 files changed
+48
-39
No files matched your search
@@ -19,7 +19,7 @@ const argv = cac().parse();
|
||||
async function runWebpack({
|
||||
watch, production, measure, dev, https,
|
||||
}) {
|
||||
const compiler = webpack(webpackConfig({ watch, production, measure }));
|
||||
const compiler = webpack(await webpackConfig({ watch, production, measure }));
|
||||
if (dev) {
|
||||
const server = new WebpackDevServer({
|
||||
port: https ? 8001 : 8000,
|
||||
@@ -124,12 +124,6 @@ async function main() {
|
||||
if (argv.options.gulp) await runGulp();
|
||||
else {
|
||||
await runWebpack(argv.options as any);
|
||||
if (fs.existsSync('public/hydro.js')) {
|
||||
fs.copyFileSync('public/hydro.js', `public/hydro-${pkg.version}.js`);
|
||||
}
|
||||
if (fs.existsSync('public/polyfill.js')) {
|
||||
fs.copyFileSync('public/polyfill.js', `public/polyfill-${pkg.version}.js`);
|
||||
}
|
||||
if (fs.existsSync('public/theme.css')) {
|
||||
fs.copyFileSync('public/theme.css', `public/theme-${pkg.version}.css`);
|
||||
}
|
||||
@@ -137,8 +131,6 @@ async function main() {
|
||||
for (const f of ['echarts', 'graphviz', 'mermaid', 'mathjax']) {
|
||||
fs.removeSync(`public/vditor/dist/js/${f}`);
|
||||
}
|
||||
const files = fs.readdirSync('public');
|
||||
files.filter((i) => /(^[in]\..+|worker)\.js\.map$/.test(i)).forEach((i) => fs.removeSync(`public/${i}`));
|
||||
}
|
||||
await Promise.all(globbySync('public/**/*.map').map((i) => fs.remove(i)));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user