build: add precompiled CLI distribution

This commit is contained in:
2026-08-29 19:00:14 +08:00
parent d074681928
commit 4d1dc76e31
77 changed files with 3461 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import { existsSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const directory = path.dirname(fileURLToPath(import.meta.url));
const bundledTheme = path.resolve(directory, '..', 'theme');
const workspaceTheme = path.resolve(directory, '..', '..', 'packages', 'slidev-theme-easy-jyy');
export function resolveTheme(theme) {
if (theme)
return theme;
if (existsSync(path.join(bundledTheme, 'package.json')))
return bundledTheme;
if (existsSync(path.join(workspaceTheme, 'package.json')))
return workspaceTheme;
throw new Error('easy-slides 主题不存在;请重新安装或构建 @easy-slides/cli');
}
//# sourceMappingURL=theme.js.map