Skip to content

Commit ec695a9

Browse files
committed
no storybook in all addon tests
1 parent 9c2e83e commit ec695a9

File tree

16 files changed

+68
-468
lines changed

16 files changed

+68
-468
lines changed

packages/addons/storybook/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process';
12
import { defineAddon } from '@sveltejs/cli-core';
23
import { getNodeTypesVersion } from '../common.ts';
34

@@ -20,6 +21,9 @@ export default defineAddon({
2021
'--no-features'
2122
];
2223

24+
// skips the onboarding prompt during tests
25+
if (process.env.NODE_ENV?.toLowerCase() === 'test') args.push('--yes');
26+
2327
await sv.execute(args, 'inherit');
2428
sv.devDependency(`@types/node`, getNodeTypesVersion());
2529
}

packages/cli/tests/cli.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ describe('cli', () => {
3333
'lucia=demo:yes',
3434
'mdsvex',
3535
'paraglide=languageTags:en,es+demo:yes',
36-
'mcp=ide:claude-code,cursor,gemini,opencode,vscode,other+setup:local',
37-
'storybook'
36+
'mcp=ide:claude-code,cursor,gemini,opencode,vscode,other+setup:local'
37+
// 'storybook' // No storybook addon during tests!
3838
]
3939
}
4040
];

packages/cli/tests/create-with-all-addons/.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,3 @@ src/lib/paraglide
2828

2929
# SQLite
3030
*.db
31-
32-
*storybook.log
33-
storybook-static

packages/cli/tests/create-with-all-addons/.storybook/main.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/cli/tests/create-with-all-addons/.storybook/preview.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2-
import storybook from "eslint-plugin-storybook";
3-
41
import prettier from 'eslint-config-prettier';
52
import svelte from 'eslint-plugin-svelte';
63

7-
export default [
8-
prettier,
9-
...svelte.configs.prettier,
10-
...storybook.configs["flat/recommended"]
11-
];
4+
export default [prettier, ...svelte.configs.prettier];
Lines changed: 61 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,63 @@
11
{
2-
"name": "create-with-all-addons",
3-
"private": true,
4-
"version": "0.0.1",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "vite dev",
8-
"build": "vite build",
9-
"preview": "vite preview",
10-
"prepare": "svelte-kit sync || echo ''",
11-
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12-
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13-
"format": "prettier --write .",
14-
"lint": "prettier --check . && eslint .",
15-
"test:unit": "vitest",
16-
"test": "npm run test:unit -- --run && npm run test:e2e",
17-
"test:e2e": "playwright test",
18-
"db:push": "drizzle-kit push",
19-
"db:generate": "drizzle-kit generate",
20-
"db:migrate": "drizzle-kit migrate",
21-
"db:studio": "drizzle-kit studio",
22-
"storybook": "storybook dev -p 6006",
23-
"build-storybook": "storybook build"
24-
},
25-
"devDependencies": {
26-
"@eslint/compat": "^1.4.0",
27-
"@eslint/js": "^9.39.1",
28-
"@inlang/paraglide-js": "^2.5.0",
29-
"@libsql/client": "^0.15.15",
30-
"@oslojs/crypto": "^1.0.1",
31-
"@oslojs/encoding": "^1.1.0",
32-
"@playwright/test": "^1.56.1",
33-
"@storybook/addon-svelte-csf": "^5.0.10",
34-
"@storybook/sveltekit": "10.1.0",
35-
"@sveltejs/adapter-node": "^5.4.0",
36-
"@sveltejs/kit": "^2.48.5",
37-
"@sveltejs/vite-plugin-svelte": "^6.2.1",
38-
"@tailwindcss/forms": "^0.5.10",
39-
"@tailwindcss/typography": "^0.5.19",
40-
"@tailwindcss/vite": "^4.1.17",
41-
"@types/node": "^22",
42-
"@vitest/browser-playwright": "^4.0.10",
43-
"drizzle-kit": "^0.31.7",
44-
"drizzle-orm": "^0.44.7",
45-
"eslint": "^9.39.1",
46-
"eslint-config-prettier": "^10.1.8",
47-
"eslint-plugin-storybook": "10.1.0",
48-
"eslint-plugin-svelte": "^3.13.0",
49-
"globals": "^16.5.0",
50-
"mdsvex": "^0.12.6",
51-
"playwright": "^1.56.1",
52-
"prettier": "^3.6.2",
53-
"prettier-plugin-svelte": "^3.4.0",
54-
"prettier-plugin-tailwindcss": "^0.7.1",
55-
"storybook": "10.1.0",
56-
"svelte": "^5.43.8",
57-
"svelte-check": "^4.3.4",
58-
"tailwindcss": "^4.1.17",
59-
"typescript": "^5.9.3",
60-
"typescript-eslint": "^8.47.0",
61-
"vite": "^7.2.2",
62-
"vite-plugin-devtools-json": "^1.0.0",
63-
"vitest": "^4.0.10",
64-
"vitest-browser-svelte": "^2.0.1"
65-
},
66-
"dependencies": {
67-
"@node-rs/argon2": "^2.0.2"
68-
}
2+
"name": "create-with-all-addons",
3+
"private": true,
4+
"version": "0.0.1",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build",
9+
"preview": "vite preview",
10+
"prepare": "svelte-kit sync || echo ''",
11+
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
12+
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
13+
"format": "prettier --write .",
14+
"lint": "prettier --check . && eslint .",
15+
"test:unit": "vitest",
16+
"test": "npm run test:unit -- --run && npm run test:e2e",
17+
"test:e2e": "playwright test",
18+
"db:push": "drizzle-kit push",
19+
"db:generate": "drizzle-kit generate",
20+
"db:migrate": "drizzle-kit migrate",
21+
"db:studio": "drizzle-kit studio"
22+
},
23+
"devDependencies": {
24+
"@eslint/compat": "^1.4.0",
25+
"@eslint/js": "^9.39.1",
26+
"@inlang/paraglide-js": "^2.5.0",
27+
"@libsql/client": "^0.15.15",
28+
"@oslojs/crypto": "^1.0.1",
29+
"@oslojs/encoding": "^1.1.0",
30+
"@playwright/test": "^1.56.1",
31+
"@sveltejs/adapter-node": "^5.4.0",
32+
"@sveltejs/kit": "^2.48.5",
33+
"@sveltejs/vite-plugin-svelte": "^6.2.1",
34+
"@tailwindcss/forms": "^0.5.10",
35+
"@tailwindcss/typography": "^0.5.19",
36+
"@tailwindcss/vite": "^4.1.17",
37+
"@types/node": "^22",
38+
"@vitest/browser-playwright": "^4.0.10",
39+
"drizzle-kit": "^0.31.7",
40+
"drizzle-orm": "^0.44.7",
41+
"eslint": "^9.39.1",
42+
"eslint-config-prettier": "^10.1.8",
43+
"eslint-plugin-svelte": "^3.13.0",
44+
"globals": "^16.5.0",
45+
"mdsvex": "^0.12.6",
46+
"playwright": "^1.56.1",
47+
"prettier": "^3.6.2",
48+
"prettier-plugin-svelte": "^3.4.0",
49+
"prettier-plugin-tailwindcss": "^0.7.1",
50+
"svelte": "^5.43.8",
51+
"svelte-check": "^4.3.4",
52+
"tailwindcss": "^4.1.17",
53+
"typescript": "^5.9.3",
54+
"typescript-eslint": "^8.47.0",
55+
"vite": "^7.2.2",
56+
"vite-plugin-devtools-json": "^1.0.0",
57+
"vitest": "^4.0.10",
58+
"vitest-browser-svelte": "^2.0.1"
59+
},
60+
"dependencies": {
61+
"@node-rs/argon2": "^2.0.2"
62+
}
6963
}

packages/cli/tests/create-with-all-addons/src/stories/Button.stories.svelte

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/cli/tests/create-with-all-addons/src/stories/Button.svelte

Lines changed: 0 additions & 30 deletions
This file was deleted.

packages/cli/tests/create-with-all-addons/src/stories/Header.stories.svelte

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)