mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
添加站内消息,修复讨论节点丢失的问题
This commit is contained in:
1 parent
33e277f28f
commit
627e64a901
44 files changed
+582
-540
No files matched your search
+7
-10
@@ -1,18 +1,15 @@
|
||||
const fs = require('fs');
|
||||
const root = require('./root');
|
||||
const ignoreFailure = require('./ignoreFailure');
|
||||
|
||||
async function build(type) {
|
||||
if (!['development', 'production'].includes(type)) throw new Error(`Unknown type: ${type}`);
|
||||
try {
|
||||
fs.rmdirSync(root('.build'));
|
||||
} catch (e) { }
|
||||
fs.mkdirSync(root('.build'));
|
||||
await Promise.all([
|
||||
require('./locales')(type),
|
||||
require('./buildModule')(type),
|
||||
require('./buildTemplate')(type),
|
||||
require('./webpack')(type),
|
||||
]);
|
||||
ignoreFailure(fs.mkdirSync, root('.cache'));
|
||||
ignoreFailure(fs.mkdirSync, root('.build'));
|
||||
await require('./locales')(type);
|
||||
await require('./buildModule')(type);
|
||||
await require('./buildTemplate')(type);
|
||||
await require('./webpack')(type);
|
||||
}
|
||||
|
||||
module.exports = build;
|
||||
|
||||
Reference in new issue
Block a user