@storyblok/nuxt 5.6.0 → 5.6.2

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.
Files changed (57) hide show
  1. package/dist/module.cjs +5 -0
  2. package/dist/module.d.ts +13 -0
  3. package/dist/module.json +5 -0
  4. package/{src/module.ts → dist/module.mjs} +19 -47
  5. package/dist/runtime/composables/useAsyncStoryblok.d.ts +2 -0
  6. package/{src/runtime/composables/useAsyncStoryblok.ts → dist/runtime/composables/useAsyncStoryblok.mjs} +6 -14
  7. package/dist/runtime/plugin.d.ts +2 -0
  8. package/{src/runtime/plugin.ts → dist/runtime/plugin.mjs} +0 -1
  9. package/dist/types.d.ts +15 -0
  10. package/package.json +4 -1
  11. package/.editorconfig +0 -12
  12. package/.eslintignore +0 -3
  13. package/.eslintrc +0 -7
  14. package/.github/ISSUE_TEMPLATE/config.yml +0 -1
  15. package/.github/ISSUE_TEMPLATE/issue.bug.yml +0 -68
  16. package/.github/ISSUE_TEMPLATE/issue.fr.yml +0 -40
  17. package/.github/dependabot.yml +0 -11
  18. package/.github/workflows/dependabot-automerge.yml +0 -28
  19. package/.github/workflows/release.yml +0 -30
  20. package/.husky/commit-msg +0 -6
  21. package/.husky/pre-commit +0 -4
  22. package/.nuxtrc +0 -1
  23. package/.prettierignore +0 -1
  24. package/cypress/.eslintrc +0 -3
  25. package/cypress/e2e/index.cy.ts +0 -34
  26. package/cypress/fixtures/stories.json +0 -7
  27. package/cypress/support/commands.ts +0 -25
  28. package/cypress/support/e2e.ts +0 -20
  29. package/cypress.config.ts +0 -11
  30. package/playground/README.md +0 -63
  31. package/playground/app.vue +0 -3
  32. package/playground/error.vue +0 -22
  33. package/playground/nuxt.config.ts +0 -18
  34. package/playground/package-lock.json +0 -11660
  35. package/playground/package.json +0 -17
  36. package/playground/pages/[...slug].vue +0 -17
  37. package/playground/pages/index.vue +0 -21
  38. package/playground/public/favicon.ico +0 -0
  39. package/playground/server/tsconfig.json +0 -3
  40. package/playground/storyblok/sub/Feature.vue +0 -16
  41. package/playground/storyblok/sub/Grid.vue +0 -19
  42. package/playground/storyblok/sub/Page.vue +0 -19
  43. package/playground/storyblok/sub/Teaser.vue +0 -19
  44. package/playground/tsconfig.json +0 -4
  45. package/playground-e2e/nuxt.config.ts +0 -24
  46. package/playground-e2e/package.json +0 -15
  47. package/playground-e2e/pages/[...slug].vue +0 -20
  48. package/playground-e2e/pages/index.vue +0 -19
  49. package/playground-e2e/pages/test.vue +0 -7
  50. package/playground-e2e/pages/vcalong.vue +0 -17
  51. package/playground-e2e/plugins/storyblok.js +0 -21
  52. package/playground-e2e/storyblok/sub/Feature.vue +0 -14
  53. package/playground-e2e/storyblok/sub/Grid.vue +0 -19
  54. package/playground-e2e/storyblok/sub/Page.vue +0 -19
  55. package/playground-e2e/storyblok/sub/Teaser.vue +0 -19
  56. package/playground-e2e/tsconfig.json +0 -11
  57. package/tsconfig.json +0 -3
@@ -0,0 +1,5 @@
1
+ module.exports = function(...args) {
2
+ return import('./module.mjs').then(m => m.default.call(this, ...args))
3
+ }
4
+ const _meta = module.exports.meta = require('./module.json')
5
+ module.exports.getMeta = () => Promise.resolve(_meta)
@@ -0,0 +1,13 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+
3
+ interface ModuleOptions {
4
+ accessToken: string;
5
+ enableSudoMode: boolean;
6
+ usePlugin: boolean;
7
+ bridge: boolean;
8
+ devtools: boolean;
9
+ apiOptions: any;
10
+ }
11
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions>;
12
+
13
+ export { ModuleOptions, _default as default };
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "@storyblok/nuxt",
3
+ "configKey": "storyblok",
4
+ "version": "5.6.2"
5
+ }
@@ -1,66 +1,37 @@
1
- import {
2
- defineNuxtModule,
3
- addPlugin,
4
- addComponentsDir,
5
- addImports,
6
- addImportsDir,
7
- createResolver
8
- } from "@nuxt/kit";
9
- import { NuxtHookName } from "@nuxt/schema";
1
+ import { defineNuxtModule, createResolver, addComponentsDir, addPlugin, addImports, addImportsDir } from '@nuxt/kit';
10
2
 
11
- export interface ModuleOptions {
12
- accessToken: string,
13
- enableSudoMode: boolean,
14
- usePlugin: boolean, // legacy opt. for enableSudoMode
15
- bridge: boolean, // storyblok bridge on/off
16
- devtools: boolean, // enable nuxt/devtools integration
17
- apiOptions: any, // storyblok-js-client options
18
- }
19
-
20
- export default defineNuxtModule<ModuleOptions>({
3
+ const module = defineNuxtModule({
21
4
  meta: {
22
5
  name: "@storyblok/nuxt",
23
6
  configKey: "storyblok"
24
7
  },
25
8
  defaults: {
26
- accessToken: '',
9
+ accessToken: "",
27
10
  enableSudoMode: false,
28
- usePlugin: true, // legacy opt. for enableSudoMode
11
+ usePlugin: true,
12
+ // legacy opt. for enableSudoMode
29
13
  bridge: true,
30
14
  devtools: false,
31
- apiOptions: {},
15
+ apiOptions: {}
32
16
  },
33
17
  setup(options, nuxt) {
34
18
  const resolver = createResolver(import.meta.url);
35
-
36
- if(nuxt.options.vite.optimizeDeps) {
37
- nuxt.options.vite.optimizeDeps.include =
38
- nuxt.options.vite.optimizeDeps.include || [];
19
+ if (nuxt.options.vite.optimizeDeps) {
20
+ nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
39
21
  nuxt.options.vite.optimizeDeps.include.push("@storyblok/nuxt");
40
22
  nuxt.options.vite.optimizeDeps.include.push("@storyblok/vue");
41
-
42
- nuxt.options.vite.optimizeDeps.exclude =
43
- nuxt.options.vite.optimizeDeps.exclude || [];
23
+ nuxt.options.vite.optimizeDeps.exclude = nuxt.options.vite.optimizeDeps.exclude || [];
44
24
  nuxt.options.vite.optimizeDeps.exclude.push("fsevents");
45
25
  }
46
-
47
-
48
- // Enable dirs
49
- // nuxt.options.components.dirs = ["~/components/storyblok"];
50
26
  addComponentsDir({ path: "~/storyblok", global: true, pathPrefix: false });
51
-
52
27
  nuxt.options.build.transpile.push(resolver.resolve("./runtime"));
53
28
  nuxt.options.build.transpile.push("@storyblok/nuxt");
54
29
  nuxt.options.build.transpile.push("@storyblok/vue");
55
-
56
- // Add plugin
57
30
  nuxt.options.runtimeConfig.public.storyblok = options;
58
31
  const enablePluginCondition = options.usePlugin === true && options.enableSudoMode === false;
59
32
  if (enablePluginCondition) {
60
33
  addPlugin(resolver.resolve("./runtime/plugin"));
61
34
  }
62
-
63
- // Add auto imports
64
35
  const names = [
65
36
  "useStoryblok",
66
37
  "useStoryblokApi",
@@ -72,19 +43,20 @@ export default defineNuxtModule<ModuleOptions>({
72
43
  addImports({ name, as: name, from: "@storyblok/vue" });
73
44
  }
74
45
  addImportsDir(resolver.resolve("./runtime/composables"));
75
-
76
46
  if (options.devtools) {
77
- nuxt.hook('devtools:customTabs' as NuxtHookName, (iframeTabs: Array<unknown>): void => {
47
+ nuxt.hook("devtools:customTabs", (iframeTabs) => {
78
48
  iframeTabs.push({
79
- name: 'storyblok',
80
- title: 'Storyblok',
81
- icon: 'i-logos-storyblok-icon',
49
+ name: "storyblok",
50
+ title: "Storyblok",
51
+ icon: "i-logos-storyblok-icon",
82
52
  view: {
83
- type: 'iframe',
84
- src: 'https://app.storyblok.com/#!/me/spaces/'
53
+ type: "iframe",
54
+ src: "https://app.storyblok.com/#!/me/spaces/"
85
55
  }
86
- })
87
- })
56
+ });
57
+ });
88
58
  }
89
59
  }
90
60
  });
61
+
62
+ export { module as default };
@@ -0,0 +1,2 @@
1
+ import type { ISbStoriesParams, StoryblokBridgeConfigV2 } from '@storyblok/vue';
2
+ export declare const useAsyncStoryblok: (url: string, apiOptions?: ISbStoriesParams, bridgeOptions?: StoryblokBridgeConfigV2) => Promise<any>;
@@ -1,33 +1,25 @@
1
1
  import { useStoryblokApi, useStoryblokBridge } from "@storyblok/vue";
2
- import type { ISbStoriesParams, StoryblokBridgeConfigV2, ISbStoryData } from '@storyblok/vue';
3
2
  import { useState, onMounted } from "#imports";
4
-
5
- export const useAsyncStoryblok = async (
6
- url: string,
7
- apiOptions: ISbStoriesParams = {},
8
- bridgeOptions: StoryblokBridgeConfigV2 = {}
9
- ) => {
3
+ export const useAsyncStoryblok = async (url, apiOptions = {}, bridgeOptions = {}) => {
10
4
  const uniqueKey = `${JSON.stringify(apiOptions)}${url}`;
11
- const story = useState<ISbStoryData>(`${uniqueKey}-state`);
5
+ const story = useState(`${uniqueKey}-state`);
12
6
  const storyblokApiInstance = useStoryblokApi();
13
-
14
7
  onMounted(() => {
15
8
  if (story.value && story.value.id) {
16
9
  useStoryblokBridge(
17
10
  story.value.id,
18
- evStory => (story.value = evStory),
19
- bridgeOptions,
11
+ (evStory) => story.value = evStory,
12
+ bridgeOptions
20
13
  );
21
14
  }
22
15
  });
23
-
24
16
  if (!story.value) {
25
17
  const { data } = await storyblokApiInstance.get(
26
18
  `cdn/stories/${url}`,
27
19
  apiOptions
28
20
  );
29
21
  story.value = data.story;
30
- };
31
-
22
+ }
23
+ ;
32
24
  return story;
33
25
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -1,6 +1,5 @@
1
1
  import { StoryblokVue, apiPlugin } from "@storyblok/vue";
2
2
  import { defineNuxtPlugin, useRuntimeConfig } from "#app";
3
-
4
3
  export default defineNuxtPlugin(({ vueApp }) => {
5
4
  let { storyblok } = useRuntimeConfig().public;
6
5
  storyblok = JSON.parse(JSON.stringify(storyblok));
@@ -0,0 +1,15 @@
1
+
2
+ import { ModuleOptions } from './module'
3
+
4
+ declare module '@nuxt/schema' {
5
+ interface NuxtConfig { ['storyblok']?: Partial<ModuleOptions> }
6
+ interface NuxtOptions { ['storyblok']?: ModuleOptions }
7
+ }
8
+
9
+ declare module 'nuxt/schema' {
10
+ interface NuxtConfig { ['storyblok']?: Partial<ModuleOptions> }
11
+ interface NuxtOptions { ['storyblok']?: ModuleOptions }
12
+ }
13
+
14
+
15
+ export { ModuleOptions, default } from './module'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyblok/nuxt",
3
- "version": "5.6.0",
3
+ "version": "5.6.2",
4
4
  "description": "Storyblok Nuxt module",
5
5
  "type": "module",
6
6
  "main": "./dist/module.cjs",
@@ -12,6 +12,9 @@
12
12
  "require": "./dist/module.cjs"
13
13
  }
14
14
  },
15
+ "files": [
16
+ "dist"
17
+ ],
15
18
  "scripts": {
16
19
  "prepack": "nuxt-module-build",
17
20
  "build": "nuxt-module-build",
package/.editorconfig DELETED
@@ -1,12 +0,0 @@
1
- root = true
2
-
3
- [*]
4
- indent_size = 2
5
- indent_style = space
6
- end_of_line = lf
7
- charset = utf-8
8
- trim_trailing_whitespace = true
9
- insert_final_newline = true
10
-
11
- [*.md]
12
- trim_trailing_whitespace = false
package/.eslintignore DELETED
@@ -1,3 +0,0 @@
1
- dist
2
- node_modules
3
- playground-e2e
package/.eslintrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "root": true,
3
- "extends": ["@nuxt/eslint-config"],
4
- "rules": {
5
- "vue/multi-word-component-names": "off"
6
- }
7
- }
@@ -1 +0,0 @@
1
- blank_issues_enabled: false
@@ -1,68 +0,0 @@
1
- name: "\U0001F41E SDK Bug Report"
2
- description: Report an issue using Nuxt 3 Storyblok SDK
3
- labels: [pending-triage, pending-author]
4
- body:
5
- - type: markdown
6
- attributes:
7
- value: |
8
- You're now going to fill out a bug report at the Nuxt 3 Storyblok SDK. Thanks a lot for taking the time and let's make Storyblok open source projects better together!
9
- - type: textarea
10
- id: bug-description
11
- attributes:
12
- label: Describe the issue you're facing
13
- description: A clear and concise description of what the bug is. If you intend to submit a PR for this issue, tell us in the description so we can review it. Thanks in advance!
14
- placeholder: My Nuxt 3 Storyblok SDK configuration is ... ## Expected behavior ... ## Current Behavior ...
15
- validations:
16
- required: true
17
- - type: input
18
- id: reproduction
19
- attributes:
20
- label: Reproduction
21
- description: Please provide a link to a repo or Stackblitz that can reproduce the issue you ran into. A minimal reproduction is required, if a report is vague or has no reproduction, it will receive a "need reproduction" label.
22
- placeholder: Reproduction URL
23
- validations:
24
- required: true
25
- - type: textarea
26
- id: reproduction-steps
27
- attributes:
28
- label: Steps to reproduce
29
- description: Please provide any reproduction steps that may need to be described.
30
- placeholder: List the commands or configuration you set when you faced the error, and describe with process you follow to get the error.
31
- - type: textarea
32
- id: system-info
33
- attributes:
34
- label: System Info
35
- description: Output of `npx envinfo --system --npmPackages '{ nuxt, @storyblok/*}' --binaries --browsers`
36
- render: shell
37
- placeholder: System, Binaries, Browsers, Nuxt 3 & Storyblok SDK version
38
- validations:
39
- required: true
40
- - type: dropdown
41
- id: package-manager
42
- attributes:
43
- label: Used Package Manager
44
- description: Select the used package manager
45
- options:
46
- - npm
47
- - yarn
48
- - pnpm
49
- validations:
50
- required: true
51
- - type: textarea
52
- id: logs
53
- attributes:
54
- label: Error logs (Optional)
55
- description: |
56
- Optional if provided reproduction. Please copy and paste the log text.
57
- - type: checkboxes
58
- id: checkboxes
59
- attributes:
60
- label: Validations
61
- description: Before submitting the issue, please make sure you do the following
62
- options:
63
- - label: Follow our [Code of Conduct](https://www.storyblok.com/trust-center#code-of-conduct?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-js-client)
64
- required: true
65
- - type: markdown
66
- attributes:
67
- value: |
68
- > This template was inspired by the [Vite issue template](https://github.com/vitejs/vite/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml)
@@ -1,40 +0,0 @@
1
- name: "\U0001F58C SDK Feature Request"
2
- description: Propose a feature or improvement that the Storyblok SDK should have
3
- labels: [enhancement, pending-triage, pending-author]
4
- body:
5
- - type: markdown
6
- attributes:
7
- value: |
8
- Thanks for helping us improve the Storyblok open source project, you rock!
9
- - type: textarea
10
- id: feature-description
11
- attributes:
12
- label: Description
13
- description: "Clear and concise description of what you want to include or enhance from the SDK. Please make the reason and usecases as detailed as possible. If you intend to submit a PR for this feature request, tell us in the description so we can review and be aware of it. Thanks in advance!"
14
- placeholder: As a developer using Storyblok SDK I want [wish] so that [benefit].
15
- validations:
16
- required: true
17
- - type: textarea
18
- id: suggested-solution
19
- attributes:
20
- label: Suggested solution or improvement
21
- description: "Link to the PR or what implementation you will expect from us (links to external examples if needed)."
22
- validations:
23
- required: true
24
- - type: textarea
25
- id: additional-context
26
- attributes:
27
- label: Additional context
28
- description: Any other context or screenshots about the feature request here.
29
- - type: checkboxes
30
- id: checkboxes
31
- attributes:
32
- label: Validations
33
- description: Before submitting the feature request, please make sure you do the following
34
- options:
35
- - label: Follow our [Code of Conduct](https://www.storyblok.com/trust-center#code-of-conduct?utm_source=github.com&utm_medium=readme&utm_campaign=storyblok-js-client)
36
- required: true
37
- - type: markdown
38
- attributes:
39
- value: |
40
- > This template was inspired by the [Vite FR template](https://github.com/vitejs/vite/blob/main/.github/ISSUE_TEMPLATE/feature_request.yml)
@@ -1,11 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: "npm"
4
- directory: "/"
5
- schedule:
6
- interval: "daily"
7
- time: "05:00"
8
- commit-message:
9
- prefix: fix
10
- prefix-development: chore
11
- include: scope
@@ -1,28 +0,0 @@
1
- # **** AUTOMERGE ****
2
- # Merge automatically the PR that contain a minor or patch update on the dependency you define in env.DEPENDENCY
3
- # - Inspiration: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
4
-
5
- name: Dependabot auto-merge
6
- on: pull_request
7
-
8
- permissions:
9
- pull-requests: write
10
- contents: write
11
-
12
- jobs:
13
- dependabot:
14
- runs-on: ubuntu-latest
15
- if: ${{ github.actor == 'dependabot[bot]' }}
16
- steps:
17
- - name: Dependabot metadata
18
- id: metadata
19
- uses: dependabot/fetch-metadata@v1.1.1
20
- with:
21
- github-token: "${{ secrets.GITHUB_TOKEN }}"
22
- - name: Enable auto-merge for Dependabot PRs
23
- if: ${{contains(steps.metadata.outputs.dependency-names, env.DEPENDENCY) && (steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor')}}
24
- run: gh pr merge --auto --merge "$PR_URL"
25
- env:
26
- DEPENDENCY: "@storyblok/vue"
27
- PR_URL: ${{github.event.pull_request.html_url}}
28
- GITHUB_TOKEN: ${{secrets.DEPENDABOT_TOKEN}}
@@ -1,30 +0,0 @@
1
- name: Release CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- jobs:
10
- release:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout
14
- uses: actions/checkout@v3
15
- - name: Setup Node
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: "18"
19
- cache: "npm"
20
- - name: Install dependencies
21
- run: npm ci && cd playground && npm ci && cd ..
22
- - name: Build lib
23
- run: npm run build
24
- - name: Cypress run
25
- run: npm run test:e2e
26
- - name: Release
27
- env:
28
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30
- run: npx semantic-release
package/.husky/commit-msg DELETED
@@ -1,6 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx --no -- commitlint --edit "$1"
5
- # npx --no-install commitlint --edit
6
-
package/.husky/pre-commit DELETED
@@ -1,4 +0,0 @@
1
- #!/bin/sh
2
- . "$(dirname "$0")/_/husky.sh"
3
-
4
- npx lint-staged
package/.nuxtrc DELETED
@@ -1 +0,0 @@
1
- typescript.includeWorkspace=true
package/.prettierignore DELETED
@@ -1 +0,0 @@
1
- **/templates/plugin.js
package/cypress/.eslintrc DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": ["plugin:cypress/recommended"]
3
- }
@@ -1,34 +0,0 @@
1
- describe("@storyblok/nuxt", () => {
2
- describe("Composition API", () => {
3
- beforeEach(() => {
4
- // cy.intercept("https://api.storyblok.com/**", {
5
- // fixture: "stories.json"
6
- // }).as("getStories");
7
- cy.visit("/vue/test");
8
- });
9
-
10
- it("should fetch and render stories", () => {
11
- it("Renders the expected story when loading the components", () => {
12
- cy.get("[data-test=page]").should("exist");
13
- cy.get("[data-test=grid]").should("exist");
14
- cy.get("[data-test=feature]").should("have.length", 2);
15
- cy.get("[data-test=teaser]").should("exist").and("have.text", "hello");
16
- });
17
- });
18
- });
19
-
20
- describe("Composition API - Long form", () => {
21
- beforeEach(() => {
22
- cy.visit("/vue");
23
- });
24
-
25
- it("should fetch and render stories", () => {
26
- it("Renders the expected story when loading the components", () => {
27
- cy.get("[data-test=page]").should("exist");
28
- cy.get("[data-test=grid]").should("exist");
29
- cy.get("[data-test=feature]").should("have.length", 3);
30
- cy.get("[data-test=teaser]").should("exist").and("have.text", "hello");
31
- });
32
- });
33
- });
34
- });
@@ -1,7 +0,0 @@
1
- {
2
- "stories": [
3
- { "name": "a", "id": 0 },
4
- { "name": "b", "id": 1 },
5
- { "name": "c", "id": 2 }
6
- ]
7
- }
@@ -1,25 +0,0 @@
1
- // ***********************************************
2
- // This example commands.js shows you how to
3
- // create various custom commands and overwrite
4
- // existing commands.
5
- //
6
- // For more comprehensive examples of custom
7
- // commands please read more here:
8
- // https://on.cypress.io/custom-commands
9
- // ***********************************************
10
- //
11
- //
12
- // -- This is a parent command --
13
- // Cypress.Commands.add('login', (email, password) => { ... })
14
- //
15
- //
16
- // -- This is a child command --
17
- // Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
18
- //
19
- //
20
- // -- This is a dual command --
21
- // Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
22
- //
23
- //
24
- // -- This will overwrite an existing command --
25
- // Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
@@ -1,20 +0,0 @@
1
- // ***********************************************************
2
- // This example support/index.js is processed and
3
- // loaded automatically before your test files.
4
- //
5
- // This is a great place to put global configuration and
6
- // behavior that modifies Cypress.
7
- //
8
- // You can change the location of this file or turn off
9
- // automatically serving support files with the
10
- // 'supportFile' configuration option.
11
- //
12
- // You can read more here:
13
- // https://on.cypress.io/configuration
14
- // ***********************************************************
15
-
16
- // Import commands.js using ES2015 syntax:
17
- import "./commands";
18
-
19
- // Alternatively you can use CommonJS syntax:
20
- // require('./commands')
package/cypress.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from "cypress";
2
-
3
- export default defineConfig({
4
- e2e: {
5
- // We've imported your old cypress plugins here.
6
- // You may want to clean this up later by importing these.
7
- baseUrl: "http://localhost:3000",
8
- viewportWidth: 1600,
9
- viewportHeight: 1400
10
- }
11
- });
@@ -1,63 +0,0 @@
1
- # Nuxt 3 Minimal Starter
2
-
3
- Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
-
5
- ## Setup
6
-
7
- Make sure to install the dependencies:
8
-
9
- ```bash
10
- # npm
11
- npm install
12
-
13
- # pnpm
14
- pnpm install
15
-
16
- # yarn
17
- yarn install
18
- ```
19
-
20
- ## Development Server
21
-
22
- Start the development server on `http://localhost:3000`:
23
-
24
- ```bash
25
- # npm
26
- npm run dev
27
-
28
- # pnpm
29
- pnpm run dev
30
-
31
- # yarn
32
- yarn dev
33
- ```
34
-
35
- ## Production
36
-
37
- Build the application for production:
38
-
39
- ```bash
40
- # npm
41
- npm run build
42
-
43
- # pnpm
44
- pnpm run build
45
-
46
- # yarn
47
- yarn build
48
- ```
49
-
50
- Locally preview production build:
51
-
52
- ```bash
53
- # npm
54
- npm run preview
55
-
56
- # pnpm
57
- pnpm run preview
58
-
59
- # yarn
60
- yarn preview
61
- ```
62
-
63
- Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
@@ -1,3 +0,0 @@
1
- <template>
2
- <NuxtPage />
3
- </template>
@@ -1,22 +0,0 @@
1
- <template>
2
- <div class="grid place-items-center h-screen text-center">
3
- <div class="flex flex-col gap-y-4">
4
- <h1 class="font-bold text-4xl">Error {{ error.statusCode }}</h1>
5
- <p>{{ error.statusMessage }}</p>
6
- <button
7
- class="px-4 py-2 bg-green-600 text-white rounded-lg"
8
- @click="handleError"
9
- >
10
- Clear errors
11
- </button>
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <script setup>
17
- defineProps({
18
- error: Object
19
- });
20
-
21
- const handleError = () => clearError({ redirect: "/" });
22
- </script>