mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix: ci
This commit is contained in:
parent
a95ba47b74
commit
c99ef68b7b
@ -73,7 +73,7 @@ async function createAppConfigPlugin({
|
||||
* Get the configuration file variable name
|
||||
* @param env
|
||||
*/
|
||||
export const getVariableName = (title: string) => {
|
||||
const getVariableName = (title: string) => {
|
||||
function strToHex(str: string) {
|
||||
const result: string[] = [];
|
||||
for (let i = 0; i < str.length; ++i) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import type { GlobEnvConfig } from '/#/config';
|
||||
import pkg from '../../package.json';
|
||||
import { getVariableName } from '@vben/vite-config/src/plugins/appConfig';
|
||||
|
||||
export function getCommonStoragePrefix() {
|
||||
const { VITE_GLOB_APP_TITLE } = getAppEnvConfig();
|
||||
@ -12,6 +11,19 @@ export function getStorageShortName() {
|
||||
return `${getCommonStoragePrefix()}${`__${pkg.version}`}__`.toUpperCase();
|
||||
}
|
||||
|
||||
const getVariableName = (title: string) => {
|
||||
function strToHex(str: string) {
|
||||
const result: string[] = [];
|
||||
for (let i = 0; i < str.length; ++i) {
|
||||
const hex = str.charCodeAt(i).toString(16);
|
||||
result.push(('000' + hex).slice(-4));
|
||||
}
|
||||
return result.join('').toUpperCase();
|
||||
}
|
||||
|
||||
return `__PRODUCTION__${strToHex(title) || '__APP'}__CONF__`.toUpperCase().replace(/\s/g, '');
|
||||
};
|
||||
|
||||
export function getAppEnvConfig() {
|
||||
console.log(import.meta.env.VITE_GLOB_APP_TITLE);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user