shadcn-nuxt 0.10.2 → 0.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -4
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Find and replace all on all files (CMD+SHIFT+F):
|
|
|
14
14
|
[![License][license-src]][license-href]
|
|
15
15
|
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
16
|
|
|
17
|
-
Shadcn Vue module for Nuxt.
|
|
17
|
+
Shadcn Vue module for Nuxt.
|
|
18
18
|
|
|
19
19
|
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
20
|
<!-- - [🏀 Online playground](https://stackblitz.com/github/radix-vue/shadcn-vue?file=playground%2Fapp.vue) -->
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readdirSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { defineNuxtModule, createResolver, addComponent } from '@nuxt/kit';
|
|
4
|
-
import
|
|
4
|
+
import { parseSync } from '@oxc-parser/wasm';
|
|
5
5
|
|
|
6
6
|
const module = defineNuxtModule({
|
|
7
7
|
meta: {
|
|
@@ -27,12 +27,11 @@ const module = defineNuxtModule({
|
|
|
27
27
|
try {
|
|
28
28
|
const filePath = await resolvePath(join(COMPONENT_DIR_PATH, dir, "index"), { extensions: [".ts", ".js"] });
|
|
29
29
|
const content = readFileSync(filePath, { encoding: "utf8" });
|
|
30
|
-
const ast =
|
|
30
|
+
const ast = parseSync(content, {
|
|
31
31
|
sourceType: "module",
|
|
32
32
|
sourceFilename: filePath
|
|
33
33
|
});
|
|
34
|
-
const
|
|
35
|
-
const exportedKeys = program.body.filter((node) => node.type === "ExportNamedDeclaration").flatMap((node) => node.specifiers.map((specifier) => specifier.exported.name)).filter((key) => /^[A-Z]/.test(key));
|
|
34
|
+
const exportedKeys = ast.program.body.filter((node) => node.type === "ExportNamedDeclaration").flatMap((node) => node.specifiers.map((specifier) => specifier.exported.name)).filter((key) => /^[A-Z]/.test(key));
|
|
36
35
|
exportedKeys.forEach((key) => {
|
|
37
36
|
addComponent({
|
|
38
37
|
name: `${prefix}${key}`,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.4",
|
|
5
5
|
"description": "Add shadcn-vue module to Nuxt",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nuxt/kit": "^3.
|
|
29
|
-
"oxc-parser": "^0.
|
|
28
|
+
"@nuxt/kit": "^3.11.2",
|
|
29
|
+
"@oxc-parser/wasm": "^0.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@nuxt/devtools": "latest",
|
|
33
|
-
"@nuxt/eslint-config": "^0.
|
|
33
|
+
"@nuxt/eslint-config": "^0.3.6",
|
|
34
34
|
"@nuxt/module-builder": "^0.5.5",
|
|
35
|
-
"@nuxt/schema": "^3.
|
|
36
|
-
"@nuxt/test-utils": "^3.
|
|
37
|
-
"@types/node": "^20.
|
|
38
|
-
"nuxt": "^3.
|
|
35
|
+
"@nuxt/schema": "^3.11.2",
|
|
36
|
+
"@nuxt/test-utils": "^3.12.0",
|
|
37
|
+
"@types/node": "^20.12.7",
|
|
38
|
+
"nuxt": "^3.11.2",
|
|
39
39
|
"vitest": "^0.33.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|