mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core&ui: remove static manifest
This commit is contained in:
1 parent
10c3a62168
commit
d7412fcc1e
18 files changed
+50
-124
No files matched your search
@@ -148,19 +148,6 @@ export async function template(pending: string[], fail: string[]) {
|
||||
await bus.serial('app/load/template');
|
||||
}
|
||||
|
||||
export async function uistatic(pending: string[], fail: string[]) {
|
||||
for (const i of pending) {
|
||||
const p = path.resolve(i, 'public', 'static-manifest.json');
|
||||
if (fs.existsSync(p) && fs.statSync(p).isFile() && !fail.includes(i)) {
|
||||
try {
|
||||
Object.assign(global.Hydro.ui.manifest, eval('require')(p));
|
||||
} catch (e) {
|
||||
fail.push(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function model(pending: string[], fail: string[]) {
|
||||
for (const i of pending) {
|
||||
let p = path.resolve(i, 'model.ts');
|
||||
|
||||
@@ -10,7 +10,7 @@ import * as bus from '../service/bus';
|
||||
import db from '../service/db';
|
||||
import {
|
||||
builtinHandler, builtinLib, builtinModel,
|
||||
builtinScript, handler, lib, locale, model, script, service, setting, template, uistatic,
|
||||
builtinScript, handler, lib, locale, model, script, service, setting, template,
|
||||
} from './common';
|
||||
|
||||
const logger = new Logger('worker');
|
||||
@@ -34,7 +34,6 @@ export async function load() {
|
||||
await Promise.all([
|
||||
locale(pending, fail),
|
||||
template(pending, fail),
|
||||
uistatic(pending, fail),
|
||||
]);
|
||||
if (detail) logger.info('finish: locale/template/static');
|
||||
const opts = options();
|
||||
|
||||
Reference in new issue
Block a user