chore: initial commit
Some checks failed
/ playwright (push) Successful in 1m33s
/ build-and-test (push) Failing after 2m7s
CI/CD Pipeline / build-and-deploy (push) Successful in 2m16s
CI/CD Pipeline / playwright (push) Successful in 3m26s

This commit is contained in:
严浩
2025-10-15 16:24:49 +08:00
commit e50d699a2a
81 changed files with 22534 additions and 0 deletions

24
src/plugins/index.ts Normal file
View File

@@ -0,0 +1,24 @@
/**
* https://github.com/antfu-collective/vitesse/blob/47618e72dfba76c77b9b85b94784d739e35c492b/src/modules/README.md
*/
type UserPlugin = (ctx: UserPluginContext) => void;
type AutoInstallModule = { [K: string]: unknown; install?: UserPlugin };
type UserPluginContext = { app: import('vue').App<Element> };
export function setupPlugins(
app: import('vue').App,
modules: AutoInstallModule | Record<string, unknown>,
) {
console.group('🔌 Plugins');
for (const path in modules) {
const module = modules[path] as AutoInstallModule;
if (module.install) {
module.install({ app });
console.debug(`%c✔ ${path}`, 'color: #07a');
} else {
if (typeof module.setupPlugins === 'function') continue;
console.warn(`%c✘ ${path} has no install function`, 'color: #f50');
}
}
console.groupEnd();
return app;
}