@storyblok/nuxt 5.7.4 → 5.7.6
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 +23 -0
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/package.json +19 -19
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
package/dist/module.d.ts
CHANGED
package/dist/module.json
CHANGED
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
|
-
|
|
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.
|
|
28
|
-
addComponentsDir({ path: options.
|
|
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.
|
|
3
|
+
"version": "5.7.6",
|
|
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": "^
|
|
37
|
-
"@commitlint/config-conventional": "^
|
|
38
|
-
"@cypress/vite-dev-server": "^5.0.
|
|
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.
|
|
41
|
-
"@nuxt/schema": "^3.
|
|
42
|
-
"@nuxt/test-utils": "^3.
|
|
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.
|
|
45
|
-
"cypress": "^13.
|
|
46
|
-
"eslint": "^8.
|
|
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.
|
|
49
|
-
"eslint-plugin-vue": "^9.
|
|
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.
|
|
52
|
-
"nuxt": "^3.
|
|
53
|
-
"prettier": "^3.0.
|
|
54
|
-
"start-server-and-test": "^2.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.
|
|
58
|
-
"@storyblok/vue": "^7.1
|
|
59
|
-
"prettier": "^3.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}": [
|