Skip to content

Commit fc35acf

Browse files
committed
duckguessr: Fix some errors, disable build
1 parent 3e31bb3 commit fc35acf

File tree

4 files changed

+235
-61
lines changed

4 files changed

+235
-61
lines changed

apps/duckguessr/.storybook/main.ts

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,15 @@
1-
import type { StorybookConfig } from "@storybook/vue3-vite";
2-
import { join, dirname } from "path";
3-
import AutoImport from "unplugin-auto-import/vite";
4-
5-
/**
6-
* This function is used to resolve the absolute path of a package.
7-
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
8-
*/
9-
const getAbsolutePath = (value: string): any =>
10-
dirname(require.resolve(join(value, "package.json")));
1+
import type { StorybookConfig } from "@nuxtjs/storybook";
112

123
const config: StorybookConfig = {
134
stories: ["../src/**/*.stories.ts"],
145
addons: [],
156
framework: {
16-
name: getAbsolutePath("@storybook/vue3-vite"),
7+
name: "@storybook-vue/nuxt",
178
options: {},
189
},
1910
core: {
2011
builder: "@storybook/builder-vite",
2112
},
22-
viteFinal: async (config) => {
23-
// Add auto-imports for Vue 3 Composition API
24-
config.plugins = config.plugins || [];
25-
config.plugins.push(
26-
AutoImport({
27-
eslintrc: {
28-
enabled: true,
29-
},
30-
imports: [
31-
"pinia",
32-
"vue",
33-
"vue/macros",
34-
"vue-router",
35-
"vue-i18n",
36-
"@vueuse/core",
37-
],
38-
dts: true,
39-
dirs: [
40-
"./src/composables",
41-
"../web/src/composables",
42-
"../web/src/stores",
43-
"../../packages/types",
44-
],
45-
vueTemplate: true,
46-
}),
47-
);
48-
49-
return config;
50-
},
5113
};
14+
5215
export default config;

apps/duckguessr/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export default defineNuxtConfig({
2626
"@pinia/nuxt",
2727
"@vueuse/nuxt",
2828
"@sentry/nuxt",
29+
"@nuxtjs/storybook",
2930
],
3031

3132
// Auto-imports

apps/duckguessr/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@
1717
"lint": "eslint --fix .",
1818
"storybook": "storybook dev -p 6006",
1919
"prod:deploy": "DIR=apps/duckguessr SERVICES='storybook' pnpm -F '~ci' prod:docker-compose-up",
20-
"prod:build-docker": "REPO_NAME=ghcr.io/bperel/duckguessr-storybook pnpm -F '~ci' prod:build-docker --target storybook -f apps/duckguessr/Dockerfile",
20+
"prod:build-docker": "echo 'disabled, would run REPO_NAME=ghcr.io/bperel/duckguessr-storybook pnpm -F '~ci' prod:build-docker --target storybook -f apps/duckguessr/Dockerfile'",
2121
"prod:transfer-files-pre": "pnpm -F '~ci' prod:transfer-files @apps/duckguessr/.env:apps/duckguessr/.env",
2222
"prod:transfer-files-post": "pnpm -F '~ci' prod:transfer-files apps/duckguessr/docker-compose.yml:@apps/duckguessr/docker-compose.yml apps/duckguessr/Caddyfile:@apps/duckguessr/Caddyfile"
2323
},
2424
"dependencies": {
2525
"@nuxtjs/i18n": "^10.1.0",
26+
"@nuxtjs/storybook": "^9.0.1",
2627
"@pinia/nuxt": "^0.5.1",
2728
"@prisma/client": "^6.16.0",
2829
"@sentry/nuxt": "^10.11.0",
@@ -49,8 +50,8 @@
4950
"@nuxt/devtools": "^1.5.0",
5051
"@nuxt/eslint": "^0.5.0",
5152
"@nuxt/typescript-build": "^3.0.2",
53+
"@storybook-vue/nuxt": "^9.0.1",
5254
"@storybook/vue3": "^9.1.5",
53-
"@storybook/vue3-vite": "^9.1.5",
5455
"@types/eslint": "^9.6.1",
5556
"@types/eslint-scope": "^8.3.2",
5657
"@types/js-cookie": "^3.0.6",

0 commit comments

Comments
 (0)