add envision-cli 0.0.6

This commit is contained in:
2024-11-29 13:32:58 +08:00
parent 35cec990c6
commit 2145fca826
5 changed files with 171 additions and 23 deletions

View File

@@ -3,7 +3,16 @@ import { getConfig } from './get-config.ts';
const config = getConfig();
export const baseURL = config?.baseURL || 'https://envision.xiongxiao.me';
export const getBaseURL = () => {
if (config?.dev) {
if (typeof config?.dev === 'undefined') {
return baseURL;
}
if (typeof config?.dev === 'string') {
if (config?.dev === 'true') {
return 'http://localhost:4002';
}
return baseURL;
}
if (config?.dev === true) {
return 'http://localhost:4002';
}
return baseURL;