[Feat] Bump version to 0.1.0-beta && 1st rel

This commit is contained in:
Minoricew
2025-04-18 19:20:46 +08:00
parent d976184e42
commit 7edf6ec364
40 changed files with 2234 additions and 20 deletions

View File

@@ -1,9 +1,21 @@
const __AURA_VERSION__ = "0.1.0-beta";
(() => {
if (!global.__HUGO_AURA__) {
global.__HUGO_AURA__ = {
configInit: true,
configInit: true, // preload 始终比 hook 晚, 默认 config 已初始化
version: __AURA_VERSION__,
};
}
if (!global.__HUGO_AURA_UI_FUNCTIONS__) {
global.__HUGO_AURA_UI_FUNCTIONS__ = {};
}
if (!global.__HUGO_AURA_UI_REACTIVES__) {
global.__HUGO_AURA_UI_REACTIVES__ = {};
}
const configManager = require("../aura/init/shared/configManager");
const WebpackHook = require("../aura/init/preload/webpackHook");
@@ -19,10 +31,17 @@
},
set(target, prop, value) {
target[prop] = value;
const configUpdateEvent = new CustomEvent("onHugoAuraConfigUpdate", {
detail: {
path: [...path, prop],
value,
},
});
document.dispatchEvent(configUpdateEvent);
console.log(
`[HugoAura / Config] Config changed at path: ${[...path, prop].join(
"."
)}`
)}, new value: ${value}`
);
configManager.writeConfig(window.__HUGO_AURA_CONFIG__);
return true;