@storyblok/nuxt 5.7.4 → 5.7.5

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 CHANGED
@@ -169,6 +169,29 @@ To link your Vue components to the equivalent one in your Storyblok space:
169
169
 
170
170
  - First, you need to load them globally adding them to the `~/storyblok` directory. It's important to name them with Pascal case in your code `ExampleComponent.vue` and with a hyphen inside your Storyblok space `example-component`, so they will be imported automatically.
171
171
 
172
+ If you want to define your own directory for the Storyblok related components, you can use the option `componentsDir` in the `nuxt.config.js`:
173
+
174
+ ```js
175
+ // nuxt.config.ts
176
+ modules: [
177
+ [
178
+ "@storyblok/nuxt",
179
+ {
180
+ accessToken: "<your-access-token>",
181
+ componentsDir: false,
182
+ }
183
+ ]
184
+ ],
185
+ components: {
186
+ dirs: [
187
+ {
188
+ path: '~/components/storyblok',
189
+ global: true,
190
+ }
191
+ ]
192
+ },
193
+ ```
194
+
172
195
  Otherwise, you can set another directory and load them manually (for example, by [using a Nuxt plugin](https://stackoverflow.com/questions/43040692/global-components-in-vue-nuxt)).
173
196
 
174
197
  > **Warning**
package/dist/module.d.mts CHANGED
@@ -7,7 +7,7 @@ interface ModuleOptions {
7
7
  bridge: boolean;
8
8
  devtools: boolean;
9
9
  apiOptions: any;
10
- globalDir: string;
10
+ componentsDir: string;
11
11
  }
12
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
13
13
 
package/dist/module.d.ts CHANGED
@@ -7,7 +7,7 @@ interface ModuleOptions {
7
7
  bridge: boolean;
8
8
  devtools: boolean;
9
9
  apiOptions: any;
10
- globalDir: string;
10
+ componentsDir: string;
11
11
  }
12
12
  declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
13
13
 
package/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@storyblok/nuxt",
3
3
  "configKey": "storyblok",
4
- "version": "5.7.4"
4
+ "version": "5.7.5"
5
5
  }
package/dist/module.mjs CHANGED
@@ -12,7 +12,7 @@ const module = defineNuxtModule({
12
12
  // legacy opt. for enableSudoMode
13
13
  bridge: true,
14
14
  devtools: false,
15
- globalDir: "~/storyblok",
15
+ componentsDir: "~/storyblok",
16
16
  apiOptions: {}
17
17
  },
18
18
  setup(options, nuxt) {
@@ -24,8 +24,8 @@ const module = defineNuxtModule({
24
24
  nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude || [];
25
25
  nuxt.options.vite.optimizeDeps.exclude.push("fsevents");
26
26
  }
27
- if (options.globalDir) {
28
- addComponentsDir({ path: options.globalDir, global: true, pathPrefix: false });
27
+ if (options.componentsDir) {
28
+ addComponentsDir({ path: options.componentsDir, global: true, pathPrefix: false });
29
29
  }
30
30
  nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
31
31
  nuxt.options.build.transpile.push("@storyblok/nuxt");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/nuxt",
3
- "version": "5.7.4",
3
+ "version": "5.7.5",
4
4
  "description": "Storyblok Nuxt module",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -33,30 +33,30 @@
33
33
  "lint": "eslint . --ext .js,.jsx,.ts,.tsx,.vue"
34
34
  },
35
35
  "devDependencies": {
36
- "@commitlint/cli": "^17.6.7",
37
- "@commitlint/config-conventional": "^17.6.7",
38
- "@cypress/vite-dev-server": "^5.0.5",
36
+ "@commitlint/cli": "^18.2.0",
37
+ "@commitlint/config-conventional": "^18.1.0",
38
+ "@cypress/vite-dev-server": "^5.0.6",
39
39
  "@nuxt/eslint-config": "^0.2.0",
40
- "@nuxt/module-builder": "^0.5.0",
41
- "@nuxt/schema": "^3.6.5",
42
- "@nuxt/test-utils": "^3.6.5",
40
+ "@nuxt/module-builder": "^0.5.2",
41
+ "@nuxt/schema": "^3.8.0",
42
+ "@nuxt/test-utils": "^3.8.0",
43
43
  "@nuxtjs/eslint-config-typescript": "latest",
44
- "@types/node": "^20.4.4",
45
- "cypress": "^13.0.0",
46
- "eslint": "^8.45.0",
44
+ "@types/node": "^20.8.10",
45
+ "cypress": "^13.4.0",
46
+ "eslint": "^8.52.0",
47
47
  "eslint-config-prettier": "^9.0.0",
48
- "eslint-plugin-cypress": "^2.13.3",
49
- "eslint-plugin-vue": "^9.15.1",
48
+ "eslint-plugin-cypress": "^2.15.1",
49
+ "eslint-plugin-vue": "^9.18.1",
50
50
  "husky": "^8.0.3",
51
- "lint-staged": "^15.0.1",
52
- "nuxt": "^3.7.0",
53
- "prettier": "^3.0.0",
54
- "start-server-and-test": "^2.0.0"
51
+ "lint-staged": "^15.0.2",
52
+ "nuxt": "^3.8.0",
53
+ "prettier": "^3.0.3",
54
+ "start-server-and-test": "^2.0.1"
55
55
  },
56
56
  "dependencies": {
57
- "@nuxt/kit": "^3.6.5",
58
- "@storyblok/vue": "^7.1.11",
59
- "prettier": "^3.0.0"
57
+ "@nuxt/kit": "^3.8.0",
58
+ "@storyblok/vue": "^7.3.1",
59
+ "prettier": "^3.0.3"
60
60
  },
61
61
  "lint-staged": {
62
62
  "*.{vue,js,css}": [