From e7121ab3da5b3152b4d37f1bf4ce02fb0332bca8 Mon Sep 17 00:00:00 2001 From: Think <73821256+tranthinh-coding@users.noreply.github.com> Date: Thu, 17 Aug 2023 19:03:15 +0700 Subject: [PATCH] close #1;fix: vuesax-alpha build doesn't have styles --- package.json | 2 +- pnpm-lock.yaml | 17 +++++++++++++---- src/core/components.ts | 2 +- src/core/styles.ts | 2 +- src/types.ts | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index f4b79dd..58b1d5d 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,6 @@ "nuxt": "^3.0.0", "typescript": "^4.9.4", "vue": "^3.2.45", - "vuesax-alpha": "0.2.0-beta.28" + "vuesax-alpha": "0.2.0-beta.51" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16ae8f6..06fe673 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ specifiers: typescript: ^4.9.4 unplugin: ^1.0.1 vue: ^3.2.45 - vuesax-alpha: 0.2.0-beta.28 + vuesax-alpha: 0.2.0-beta.51 dependencies: '@nuxt/kit': 3.6.1 @@ -30,7 +30,7 @@ devDependencies: nuxt: 3.6.1_nuhvzksnz3oa22qlp6qcqjnjby typescript: 4.9.5 vue: 3.3.4 - vuesax-alpha: 0.2.0-beta.28_vue@3.3.4 + vuesax-alpha: 0.2.0-beta.51_vue@3.3.4 packages: @@ -1659,6 +1659,14 @@ packages: resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==} dev: true + /@vuesax-alpha/icons-vue/0.0.2-beta.11_vue@3.3.4: + resolution: {integrity: sha512-tmTXL8sC0hdNGtqSUyh0sfnS9WYaNG/L0yP8uwkJuQqRh70DMUXsj3WU4JWEwm0Nv+aTRKSyGDDWUhauUsqLGw==} + peerDependencies: + vue: ^3.2.0 + dependencies: + vue: 3.3.4 + dev: true + /@vuesax-alpha/icons-vue/0.0.2-beta.9_vue@3.3.4: resolution: {integrity: sha512-7F3b6TBglSVEo4fONc5k83ZbPJNjVCfQni7uHFSvQwlZTvp8QzOkwpP6rHdOHZiZC+DoiYpzB6ZZvH5udSdnvQ==} peerDependencies: @@ -6624,14 +6632,15 @@ packages: '@vue/shared': 3.3.4 dev: true - /vuesax-alpha/0.2.0-beta.28_vue@3.3.4: - resolution: {integrity: sha512-JWufp4dFb9QHJMjnTWITS8m9NOEE/5Hdg9Ko2YpogIG3XQYP3LDYtDbiza4Ngb5IywJZmWJWau41b0mt3aRDRA==} + /vuesax-alpha/0.2.0-beta.51_vue@3.3.4: + resolution: {integrity: sha512-W/lEi0J8JYnfkEb6IeSq+z5FiRPrt/n0KWlM86HBPS6DFiw5CfM4QY/smSRO2o6yRtSZwlXIMrwgIPCw62h1Nw==} peerDependencies: vue: ^3.2.0 dependencies: '@ctrl/tinycolor': 3.6.0 '@types/lodash': 4.14.195 '@types/lodash-es': 4.17.7 + '@vuesax-alpha/icons-vue': 0.0.2-beta.11_vue@3.3.4 '@vueuse/core': 9.13.0_vue@3.3.4 async-validator: 4.2.5 dayjs: 1.11.9 diff --git a/src/core/components.ts b/src/core/components.ts index 698c0d5..722e458 100644 --- a/src/core/components.ts +++ b/src/core/components.ts @@ -21,7 +21,7 @@ export function resolveComponents (config: Options) { const componentName = subComponentsMap[name] || name const dir = hyphenate(componentName.slice(2)) const filePath = from !== iconLibraryName - ? `${libraryName}/es/packages/components/${dir}/index` + ? `${libraryName}/es/components/${dir}/index` : from addComponent({ diff --git a/src/core/styles.ts b/src/core/styles.ts index 287c8a7..c6b37af 100644 --- a/src/core/styles.ts +++ b/src/core/styles.ts @@ -9,7 +9,7 @@ export function getStyleDir (config: Options, name: string) { const dir = hyphenate(name.slice(2)) const type = config.importStyle === 'scss' ? 'index' : 'css' - return `${libraryName}/es/packages/components/${dir}/style/${type}` + return `${libraryName}/es/components/${dir}/style/${type}` } export function resolveStyles (config: Options, name: string) { diff --git a/src/types.ts b/src/types.ts index 4b31df7..6760513 100644 --- a/src/types.ts +++ b/src/types.ts @@ -19,7 +19,7 @@ export interface Options extends TransformOptions { /** * A list of components that need to be automatically imported externally. * - * @default 'from vuesax-alpha/es/packages/components' + * @default 'from vuesax-alpha/es/components' * * If there are components that are not imported automatically from Vuesax Alpha, you need to add the component name here. */