From 82e4d0a6bb6933e5785de4857311ae825e7f7702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=99=93=E4=B8=9C?= <1357805398@qq.com> Date: Thu, 30 May 2024 00:02:43 +0800 Subject: [PATCH] chore(example): add env --- examples/shadcn-admin/src/lib/utils.ts | 4 ++-- examples/vue-cli-vue3/src/App.vue | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/shadcn-admin/src/lib/utils.ts b/examples/shadcn-admin/src/lib/utils.ts index 656a285..9c39227 100644 --- a/examples/shadcn-admin/src/lib/utils.ts +++ b/examples/shadcn-admin/src/lib/utils.ts @@ -1,13 +1,13 @@ import { type ClassValue, clsx } from 'clsx' import { twMerge } from 'tailwind-merge' -import cssMap from 'twst:css-map' + +const cssMap = import.meta.env.TWST_CSS_MAP ?? {}; console.log(cssMap); const shortToOriginMap = new Map(Object.entries(cssMap)) const originToShortMap = new Map( Object.entries(cssMap).map(([k, v]) => [v, k]) ) -console.log(shortToOriginMap, originToShortMap) export function cn(...inputs: ClassValue[]) { const classnames = clsx(inputs) const before = classnames diff --git a/examples/vue-cli-vue3/src/App.vue b/examples/vue-cli-vue3/src/App.vue index 419f7f1..cf2edef 100644 --- a/examples/vue-cli-vue3/src/App.vue +++ b/examples/vue-cli-vue3/src/App.vue @@ -9,6 +9,9 @@ import HelloWorld3 from './components/HelloWorld3.vue'; +