shadcn-nuxt 2.2.0 → 2.3.0

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shadcn",
3
3
  "configKey": "shadcn",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.1",
7
7
  "unbuild": "unknown"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { existsSync, readdirSync, readFileSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
- import { defineNuxtModule, createResolver, addComponent } from '@nuxt/kit';
3
+ import { defineNuxtModule, createResolver, addComponentsDir, addComponent } from '@nuxt/kit';
4
4
  import { parseSync } from 'oxc-parser';
5
5
 
6
6
  const module = defineNuxtModule({
@@ -21,14 +21,15 @@ const module = defineNuxtModule({
21
21
  console.warn(`Component directory does not exist: ${componentsPath}`);
22
22
  return;
23
23
  }
24
- nuxt.hook("components:dirs", (dirs) => {
25
- dirs.unshift({
26
- path: componentsPath,
27
- extensions: []
28
- });
24
+ addComponentsDir({
25
+ path: componentsPath,
26
+ extensions: [],
27
+ ignore: ["**/*"]
28
+ }, {
29
+ prepend: true
29
30
  });
30
31
  try {
31
- readdirSync(componentsPath).forEach(async (dir) => {
32
+ await Promise.all(readdirSync(componentsPath).map(async (dir) => {
32
33
  try {
33
34
  const filePath = await resolvePath(join(COMPONENT_DIR_PATH, dir, "index"), { extensions: [".ts", ".js"] });
34
35
  const content = readFileSync(filePath, { encoding: "utf8" });
@@ -50,7 +51,7 @@ const module = defineNuxtModule({
50
51
  if (err instanceof Error)
51
52
  console.warn("Module error: ", err.message);
52
53
  }
53
- });
54
+ }));
54
55
  } catch (err) {
55
56
  if (err instanceof Error)
56
57
  console.warn(err.message);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shadcn-nuxt",
3
3
  "type": "module",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "description": "Add shadcn-vue module to Nuxt",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -23,21 +23,22 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@nuxt/kit": "^3.17.3",
27
- "oxc-parser": "^0.72.0"
26
+ "@nuxt/kit": "^3.17.4",
27
+ "oxc-parser": "^0.93.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@nuxt/eslint-config": "^1.3.1",
30
+ "@nuxt/eslint-config": "^1.4.1",
31
31
  "@nuxt/module-builder": "^1.0.1",
32
- "@nuxt/schema": "^3.17.3",
33
- "@nuxt/test-utils": "^3.15.4",
32
+ "@nuxt/schema": "^3.17.4",
33
+ "@nuxt/test-utils": "^3.19.1",
34
34
  "@nuxtjs/color-mode": "^3.5.2",
35
- "@nuxtjs/tailwindcss": "^6.13.1",
36
- "@types/node": "^22.13.1",
37
- "nuxt": "^3.17.3",
35
+ "@nuxtjs/tailwindcss": "^6.14.0",
36
+ "@types/node": "^22",
37
+ "nuxt": "^3.17.4",
38
38
  "typescript": "^5.8.3"
39
39
  },
40
40
  "scripts": {
41
+ "build": "nuxt-module-build prepare && nuxt-module-build build",
41
42
  "dev": "nuxi dev playground",
42
43
  "dev:build": "nuxi build playground",
43
44
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",