@erclx/aitk 0.8.0
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/LICENSE +21 -0
- package/README.md +99 -0
- package/claude/.claude-plugin/plugin.json +19 -0
- package/claude/skills/bash-script/SKILL.md +96 -0
- package/claude/skills/bash-script/references/patterns.md +349 -0
- package/claude/skills/ci-workflow/SKILL.md +52 -0
- package/claude/skills/ci-workflow/references/workflows.md +74 -0
- package/claude/skills/claude-address-review/SKILL.md +107 -0
- package/claude/skills/claude-autoship/SKILL.md +137 -0
- package/claude/skills/claude-design-extract/SKILL.md +69 -0
- package/claude/skills/claude-design-propose/SKILL.md +75 -0
- package/claude/skills/claude-diagram/SKILL.md +126 -0
- package/claude/skills/claude-docs/SKILL.md +204 -0
- package/claude/skills/claude-feature/REQUIREMENT.md +35 -0
- package/claude/skills/claude-feature/SKILL.md +148 -0
- package/claude/skills/claude-groundwork/SKILL.md +148 -0
- package/claude/skills/claude-groundwork/references/folder-format.md +107 -0
- package/claude/skills/claude-memory-capture/SKILL.md +80 -0
- package/claude/skills/claude-memory-review/REQUIREMENT.md +37 -0
- package/claude/skills/claude-memory-review/SKILL.md +206 -0
- package/claude/skills/claude-orchestrate/SKILL.md +125 -0
- package/claude/skills/claude-pr-review/SKILL.md +150 -0
- package/claude/skills/claude-review/SKILL.md +136 -0
- package/claude/skills/claude-roadmap/SKILL.md +61 -0
- package/claude/skills/claude-roadmap/references/roadmap.md +52 -0
- package/claude/skills/claude-screencast/SKILL.md +160 -0
- package/claude/skills/claude-seed-sync/SKILL.md +141 -0
- package/claude/skills/claude-slides-draft/SKILL.md +62 -0
- package/claude/skills/claude-standards-audit/REQUIREMENT.md +33 -0
- package/claude/skills/claude-standards-audit/SKILL.md +79 -0
- package/claude/skills/claude-standards-audit/references/branch.md +49 -0
- package/claude/skills/claude-standards-audit/references/pr.md +124 -0
- package/claude/skills/claude-tasks/SKILL.md +123 -0
- package/claude/skills/claude-ui-test/SKILL.md +75 -0
- package/claude/skills/claude-ux-audit/SKILL.md +78 -0
- package/claude/skills/claude-worktree/SKILL.md +79 -0
- package/claude/skills/cli-script/SKILL.md +47 -0
- package/claude/skills/cli-script/references/template.md +43 -0
- package/claude/skills/create-rule/SKILL.md +68 -0
- package/claude/skills/create-skill/REQUIREMENT.md +30 -0
- package/claude/skills/create-skill/SKILL.md +24 -0
- package/claude/skills/create-snippet/SKILL.md +28 -0
- package/claude/skills/create-snippet/references/snippets.md +57 -0
- package/claude/skills/create-standard/SKILL.md +31 -0
- package/claude/skills/create-standard/references/standard.md +52 -0
- package/claude/skills/docs-sync/SKILL.md +87 -0
- package/claude/skills/git-branch/REQUIREMENT.md +38 -0
- package/claude/skills/git-branch/SKILL.md +60 -0
- package/claude/skills/git-branch/references/branch.md +49 -0
- package/claude/skills/git-commit/REQUIREMENT.md +33 -0
- package/claude/skills/git-commit/SKILL.md +51 -0
- package/claude/skills/git-commit/references/commit.md +63 -0
- package/claude/skills/git-followup/REQUIREMENT.md +38 -0
- package/claude/skills/git-followup/SKILL.md +35 -0
- package/claude/skills/git-issue/REQUIREMENT.md +38 -0
- package/claude/skills/git-issue/SKILL.md +69 -0
- package/claude/skills/git-issue/references/issue.md +84 -0
- package/claude/skills/git-pr/REQUIREMENT.md +37 -0
- package/claude/skills/git-pr/SKILL.md +119 -0
- package/claude/skills/git-pr/references/branch.md +49 -0
- package/claude/skills/git-pr/references/pr.md +124 -0
- package/claude/skills/git-ship/REQUIREMENT.md +34 -0
- package/claude/skills/git-ship/SKILL.md +39 -0
- package/claude/skills/git-split/REQUIREMENT.md +38 -0
- package/claude/skills/git-split/SKILL.md +160 -0
- package/claude/skills/git-split/references/branch.md +49 -0
- package/claude/skills/git-split/references/pr.md +124 -0
- package/claude/skills/git-stage/REQUIREMENT.md +36 -0
- package/claude/skills/git-stage/SKILL.md +74 -0
- package/claude/skills/git-stage/references/commit.md +63 -0
- package/claude/skills/git-worktree/REQUIREMENT.md +37 -0
- package/claude/skills/git-worktree/SKILL.md +120 -0
- package/claude/skills/migration-claude-md/SKILL.md +74 -0
- package/claude/skills/migration-context/SKILL.md +93 -0
- package/claude/skills/migration-standards/SKILL.md +75 -0
- package/claude/skills/project-commands/SKILL.md +73 -0
- package/claude/skills/session-resume/SKILL.md +36 -0
- package/claude/skills/setup-gov/SKILL.md +71 -0
- package/claude/skills/setup-indexes/SKILL.md +148 -0
- package/claude/skills/setup-init/SKILL.md +114 -0
- package/claude/skills/setup-plugins/SKILL.md +81 -0
- package/claude/skills/setup-plugins/references/plugin-catalog.md +53 -0
- package/claude/skills/setup-verify/SKILL.md +51 -0
- package/claude/skills/systematic-debugging/SKILL.md +70 -0
- package/claude/skills/toolkit-cli/SKILL.md +38 -0
- package/claude/skills/toolkit-feedback/SKILL.md +80 -0
- package/claude/skills/toolkit-operator/SKILL.md +45 -0
- package/claude/skills/toolkit-triage/SKILL.md +63 -0
- package/claude/skills/youtube-transcripts/SKILL.md +34 -0
- package/docs/agents.md +371 -0
- package/docs/ai-workflow.md +157 -0
- package/docs/index.md +20 -0
- package/docs/operating-model.md +106 -0
- package/docs/target-projects.md +183 -0
- package/docs/visual-design-workflow.md +136 -0
- package/docs/zshrc-aliases.md +65 -0
- package/governance/rules/claude/500-prose.md +12 -0
- package/governance/rules/claude/510-context.md +16 -0
- package/governance/rules/claude/520-wireframes.md +12 -0
- package/governance/rules/claude/530-requirements.md +11 -0
- package/governance/rules/claude/540-architecture.md +11 -0
- package/governance/rules/claude/550-design.md +11 -0
- package/governance/rules/claude/555-tasks.md +12 -0
- package/governance/rules/claude/560-diagrams.md +11 -0
- package/governance/rules/claude/570-skill.md +18 -0
- package/governance/rules/claude/580-readme.md +11 -0
- package/governance/rules/claude/590-rule-authoring.md +12 -0
- package/governance/rules/core/000-constitution.md +30 -0
- package/governance/rules/core/010-testing.md +35 -0
- package/governance/rules/core/020-concurrency.md +22 -0
- package/governance/rules/core/030-error-handling.md +31 -0
- package/governance/rules/core/040-performance.md +20 -0
- package/governance/rules/core/050-logging.md +20 -0
- package/governance/rules/core/060-naming.md +19 -0
- package/governance/rules/core/070-planning.md +13 -0
- package/governance/rules/core/080-config-comments.md +22 -0
- package/governance/rules/framework/200-react.md +51 -0
- package/governance/rules/framework/210-astro.md +41 -0
- package/governance/rules/framework/220-fastapi.md +43 -0
- package/governance/rules/framework/230-nextjs.md +48 -0
- package/governance/rules/framework/250-tailwind.md +32 -0
- package/governance/rules/framework/260-shadcn.md +34 -0
- package/governance/rules/lang/100-typescript.md +40 -0
- package/governance/rules/lang/110-python.md +42 -0
- package/governance/rules/lib/300-testing-ts.md +38 -0
- package/governance/rules/lib/310-zod.md +25 -0
- package/governance/rules/lib/320-tanstack-query.md +32 -0
- package/governance/rules/lib/330-testing-py.md +44 -0
- package/governance/rules/lib/340-pydantic.md +38 -0
- package/governance/rules/lib/350-security-web.md +31 -0
- package/governance/rules/ui/400-ui.md +34 -0
- package/governance/rules/ui/410-a11y.md +44 -0
- package/governance/rules/ui/420-forms.md +34 -0
- package/governance/rules/ui/430-ux-completeness.md +62 -0
- package/governance/stacks/astro.toml +2 -0
- package/governance/stacks/base.toml +2 -0
- package/governance/stacks/node.toml +2 -0
- package/governance/stacks/python-fastapi.toml +2 -0
- package/governance/stacks/python.toml +2 -0
- package/governance/stacks/react.toml +2 -0
- package/package.json +67 -0
- package/scripts/config.sh +11 -0
- package/scripts/core/bootstrap.sh +81 -0
- package/scripts/core/check-plugin-boundary.sh +45 -0
- package/scripts/core/check-skill-paths.sh +25 -0
- package/scripts/core/clean.sh +36 -0
- package/scripts/core/install-check.sh +93 -0
- package/scripts/core/regen-claude-copies.sh +26 -0
- package/scripts/core/regen-indexes.sh +10 -0
- package/scripts/core/regen-skill-references.sh +27 -0
- package/scripts/core/snapshot.sh +132 -0
- package/scripts/core/update.sh +35 -0
- package/scripts/core/verify.sh +201 -0
- package/scripts/docs/list.sh +129 -0
- package/scripts/gov/list.sh +234 -0
- package/scripts/lib/frontmatter.sh +30 -0
- package/scripts/lib/gov.sh +14 -0
- package/scripts/lib/sandbox-fixtures.sh +109 -0
- package/scripts/lib/sandbox-git.sh +73 -0
- package/scripts/lib/tooling.sh +24 -0
- package/scripts/lib/ui.sh +173 -0
- package/scripts/lib/worktree.sh +20 -0
- package/scripts/manage-sandbox.sh +453 -0
- package/scripts/snippets/create.sh +156 -0
- package/scripts/standards/list.sh +91 -0
- package/scripts/tooling/create.sh +109 -0
- package/scripts/tooling/ref.sh +141 -0
- package/scripts/tooling/verify.sh +179 -0
- package/snippets/claude/decision-memo.md +39 -0
- package/snippets/claude/feature-recap.md +19 -0
- package/snippets/claude/figma-steps.md +18 -0
- package/snippets/claude/orchestrator-resume.md +23 -0
- package/snippets/claude/orchestrator-sweep.md +10 -0
- package/snippets/compact-summary.md +5 -0
- package/snippets/create-snippet.md +7 -0
- package/snippets/decision-help.md +6 -0
- package/snippets/meta-prompt.md +14 -0
- package/snippets/research-prompt.md +7 -0
- package/snippets/session-notes.md +11 -0
- package/snippets/snippets.toml +6 -0
- package/snippets/step-by-step.md +10 -0
- package/snippets/web-research.md +21 -0
- package/src/claude/gitignore.ts +51 -0
- package/src/claude/seeds-list.ts +47 -0
- package/src/claude/seeds.ts +124 -0
- package/src/claude/settings.ts +151 -0
- package/src/cli-run.ts +43 -0
- package/src/cli.ts +111 -0
- package/src/commands/claude.ts +349 -0
- package/src/commands/design.ts +39 -0
- package/src/commands/docs.ts +59 -0
- package/src/commands/feedback-format.ts +23 -0
- package/src/commands/feedback.ts +103 -0
- package/src/commands/gov.ts +268 -0
- package/src/commands/indexes.ts +182 -0
- package/src/commands/init.ts +117 -0
- package/src/commands/pass-through.ts +39 -0
- package/src/commands/sandbox.ts +315 -0
- package/src/commands/slides.ts +106 -0
- package/src/commands/snippets.ts +236 -0
- package/src/commands/standards.ts +89 -0
- package/src/commands/sync.ts +211 -0
- package/src/commands/tasks.ts +185 -0
- package/src/commands/tooling.ts +432 -0
- package/src/commands/transcripts.ts +48 -0
- package/src/commands/wiki.ts +101 -0
- package/src/copy.ts +30 -0
- package/src/design/parse.ts +79 -0
- package/src/design/render.ts +170 -0
- package/src/docs/read.ts +59 -0
- package/src/exec.ts +17 -0
- package/src/frontmatter.ts +13 -0
- package/src/github-format.ts +13 -0
- package/src/github.ts +20 -0
- package/src/gov/adapter.ts +73 -0
- package/src/gov/install.ts +103 -0
- package/src/gov/payload.ts +39 -0
- package/src/gov/stacks.ts +124 -0
- package/src/indexes/frontmatter.ts +46 -0
- package/src/indexes/regen.ts +84 -0
- package/src/indexes/render.ts +181 -0
- package/src/indexes/walk.ts +111 -0
- package/src/init/flags.ts +66 -0
- package/src/init/plan.ts +128 -0
- package/src/init/run.ts +46 -0
- package/src/init/steps.ts +91 -0
- package/src/sandbox/coverage.ts +115 -0
- package/src/sandbox/expect.ts +412 -0
- package/src/slides/layouts.ts +391 -0
- package/src/slides/open.ts +18 -0
- package/src/slides/parse.ts +84 -0
- package/src/slides/render.ts +88 -0
- package/src/slides/styles.ts +44 -0
- package/src/snippets/adapter.ts +34 -0
- package/src/snippets/categories.ts +59 -0
- package/src/snippets/install.ts +125 -0
- package/src/snippets/list.ts +32 -0
- package/src/snippets/presets.ts +50 -0
- package/src/standards/adapter.ts +51 -0
- package/src/standards/index-refresh.ts +44 -0
- package/src/standards/install.ts +52 -0
- package/src/sync/check.ts +269 -0
- package/src/sync/engine.ts +416 -0
- package/src/sync/git.ts +204 -0
- package/src/sync/stamp.ts +202 -0
- package/src/sync/target.ts +79 -0
- package/src/sync/workflow.ts +201 -0
- package/src/target.ts +43 -0
- package/src/tasks/archive.ts +304 -0
- package/src/tooling/gitignore.ts +122 -0
- package/src/tooling/inject.ts +214 -0
- package/src/tooling/list.ts +39 -0
- package/src/tooling/manifest.ts +178 -0
- package/src/tooling/package.ts +166 -0
- package/src/tooling/scan.ts +186 -0
- package/src/transcripts/fetch.ts +156 -0
- package/src/transcripts/metadata.ts +54 -0
- package/src/transcripts/vtt.ts +114 -0
- package/src/ui.ts +187 -0
- package/src/wiki/init.ts +85 -0
- package/standards/architecture.md +41 -0
- package/standards/bundled/branch.md +49 -0
- package/standards/bundled/commit.md +63 -0
- package/standards/bundled/issue.md +84 -0
- package/standards/bundled/pr.md +124 -0
- package/standards/bundled/roadmap.md +52 -0
- package/standards/bundled/snippets.md +57 -0
- package/standards/bundled/standard.md +52 -0
- package/standards/context.md +132 -0
- package/standards/design.md +31 -0
- package/standards/diagrams.md +55 -0
- package/standards/index.md +21 -0
- package/standards/prose.md +122 -0
- package/standards/readme.md +163 -0
- package/standards/requirements.md +61 -0
- package/standards/rule.md +79 -0
- package/standards/skill.md +257 -0
- package/standards/tasks.md +140 -0
- package/standards/versioning.md +47 -0
- package/standards/wireframes.md +67 -0
- package/tooling/astro/configs/astro.config.mjs +17 -0
- package/tooling/astro/configs/eslint.config.js +79 -0
- package/tooling/astro/configs/playwright.config.ts +25 -0
- package/tooling/astro/configs/tsconfig.json +12 -0
- package/tooling/astro/configs/vitest.config.ts +22 -0
- package/tooling/astro/manifest.toml +32 -0
- package/tooling/astro/reference.md +60 -0
- package/tooling/base/configs/.editorconfig +5 -0
- package/tooling/base/configs/.github/pull_request_template.md +18 -0
- package/tooling/base/configs/.github/workflows/verify.yml +35 -0
- package/tooling/base/configs/.husky/commit-msg +1 -0
- package/tooling/base/configs/.husky/post-merge +61 -0
- package/tooling/base/configs/.husky/post-rewrite +21 -0
- package/tooling/base/configs/.husky/pre-commit +1 -0
- package/tooling/base/configs/.husky/pre-push +1 -0
- package/tooling/base/configs/.prettierrc +12 -0
- package/tooling/base/configs/.shellcheckrc +1 -0
- package/tooling/base/configs/.vscode/extensions.json +9 -0
- package/tooling/base/configs/.vscode/settings.json +3 -0
- package/tooling/base/configs/commitlint.config.js +11 -0
- package/tooling/base/configs/scripts/clean.sh +45 -0
- package/tooling/base/configs/scripts/update.sh +49 -0
- package/tooling/base/configs/scripts/verify.sh +64 -0
- package/tooling/base/manifest.toml +32 -0
- package/tooling/base/reference.md +114 -0
- package/tooling/base/seeds/.claude/context/ci.md +27 -0
- package/tooling/base/seeds/.claude/context/development.md +32 -0
- package/tooling/base/seeds/.cspell/project-terms.txt +0 -0
- package/tooling/base/seeds/.cspell/tech-stack.txt +19 -0
- package/tooling/base/seeds/.lintstagedrc +8 -0
- package/tooling/base/seeds/.prettierignore +0 -0
- package/tooling/base/seeds/cspell.json +20 -0
- package/tooling/claude/manifest.toml +11 -0
- package/tooling/claude/reference.md +62 -0
- package/tooling/claude/seeds/.claude/ARCHITECTURE.md +13 -0
- package/tooling/claude/seeds/.claude/DESIGN.md +62 -0
- package/tooling/claude/seeds/.claude/REQUIREMENTS.md +18 -0
- package/tooling/claude/seeds/.claude/context/index.md +8 -0
- package/tooling/claude/seeds/.claude/hooks/index-reminder.sh +43 -0
- package/tooling/claude/seeds/.claude/hooks/scratch-guard.sh +45 -0
- package/tooling/claude/seeds/.claude/hooks/standards-audit.sh +61 -0
- package/tooling/claude/seeds/.claude/hooks/tasks-index.sh +60 -0
- package/tooling/claude/seeds/.claude/settings.json +39 -0
- package/tooling/claude/seeds/.claude/tasks/index.md +8 -0
- package/tooling/claude/seeds/.claude/wireframes/index.md +8 -0
- package/tooling/claude/seeds/CLAUDE.md +87 -0
- package/tooling/claude/user/settings.template.json +10 -0
- package/tooling/claude/user/statusline-command.sh +53 -0
- package/tooling/python/configs/.coveragerc +14 -0
- package/tooling/python/configs/.python-version +1 -0
- package/tooling/python/configs/mypy.ini +6 -0
- package/tooling/python/configs/pytest.ini +4 -0
- package/tooling/python/configs/ruff.toml +15 -0
- package/tooling/python/configs/scripts/verify.sh +77 -0
- package/tooling/python/manifest.toml +16 -0
- package/tooling/python/reference.md +66 -0
- package/tooling/python/seeds/.cspell/tech-stack.txt +19 -0
- package/tooling/python/seeds/tests/test_smoke.py +2 -0
- package/tooling/vite-react/configs/playwright.config.ts +25 -0
- package/tooling/vite-react/configs/tsconfig.json +35 -0
- package/tooling/vite-react/configs/vite.config.ts +14 -0
- package/tooling/vite-react/configs/vitest.config.ts +26 -0
- package/tooling/vite-react/manifest.toml +21 -0
- package/tooling/vite-react/reference.md +55 -0
- package/tooling/vite-react/seeds/.cspell/project-terms.txt +1 -0
- package/tooling/vite-react/seeds/.cspell/tech-stack.txt +1 -0
- package/tooling/web/configs/.github/workflows/verify.yml +134 -0
- package/tooling/web/configs/.vscode/extensions.json +13 -0
- package/tooling/web/configs/.vscode/settings.json +10 -0
- package/tooling/web/configs/e2e/home.spec.ts +6 -0
- package/tooling/web/configs/e2e/screenshot.ts +41 -0
- package/tooling/web/configs/eslint.config.js +82 -0
- package/tooling/web/configs/scripts/screenshot.sh +28 -0
- package/tooling/web/configs/scripts/verify.sh +80 -0
- package/tooling/web/configs/src/test/setup.ts +8 -0
- package/tooling/web/manifest.toml +57 -0
- package/tooling/web/reference.md +95 -0
- package/tooling/web/seeds/.cspell/tech-stack.txt +18 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
const isCI = !!process.env.CI
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
testDir: 'e2e',
|
|
7
|
+
forbidOnly: isCI,
|
|
8
|
+
retries: isCI ? 2 : 0,
|
|
9
|
+
workers: isCI ? 1 : undefined,
|
|
10
|
+
reporter: isCI ? 'list' : 'html',
|
|
11
|
+
use: {
|
|
12
|
+
trace: 'on-first-retry',
|
|
13
|
+
baseURL: 'http://localhost:5173',
|
|
14
|
+
},
|
|
15
|
+
projects: [
|
|
16
|
+
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
|
|
17
|
+
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
|
|
18
|
+
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
|
|
19
|
+
],
|
|
20
|
+
webServer: {
|
|
21
|
+
command: 'bun run dev',
|
|
22
|
+
url: 'http://localhost:5173',
|
|
23
|
+
reuseExistingServer: !isCI,
|
|
24
|
+
},
|
|
25
|
+
})
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2023",
|
|
4
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"allowImportingTsExtensions": true,
|
|
8
|
+
"verbatimModuleSyntax": true,
|
|
9
|
+
"moduleDetection": "force",
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noUnusedLocals": true,
|
|
13
|
+
"noUnusedParameters": true,
|
|
14
|
+
"erasableSyntaxOnly": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"types": [
|
|
19
|
+
"vite/client",
|
|
20
|
+
"vitest/globals",
|
|
21
|
+
"@testing-library/jest-dom",
|
|
22
|
+
"node"
|
|
23
|
+
],
|
|
24
|
+
"paths": {
|
|
25
|
+
"@/*": ["./src/*"]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"src",
|
|
30
|
+
"vite.config.ts",
|
|
31
|
+
"vitest.config.ts",
|
|
32
|
+
"e2e",
|
|
33
|
+
"playwright.config.ts"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import path from 'path'
|
|
4
|
+
import { defineConfig } from 'vite'
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react(), tailwindcss()],
|
|
8
|
+
resolve: {
|
|
9
|
+
alias: {
|
|
10
|
+
'@': path.resolve(__dirname, './src'),
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
base: process.env.VITE_BASE_URL ?? '/',
|
|
14
|
+
})
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfig, mergeConfig } from 'vitest/config'
|
|
2
|
+
|
|
3
|
+
import viteConfig from './vite.config'
|
|
4
|
+
|
|
5
|
+
export default mergeConfig(
|
|
6
|
+
viteConfig,
|
|
7
|
+
defineConfig({
|
|
8
|
+
test: {
|
|
9
|
+
environment: 'jsdom',
|
|
10
|
+
globals: true,
|
|
11
|
+
setupFiles: ['src/test/setup.ts'],
|
|
12
|
+
passWithNoTests: true,
|
|
13
|
+
exclude: [
|
|
14
|
+
'**/node_modules/**',
|
|
15
|
+
'**/dist/**',
|
|
16
|
+
'**/e2e/**',
|
|
17
|
+
'**/.{idea,git,cache,output,temp}/**',
|
|
18
|
+
],
|
|
19
|
+
coverage: {
|
|
20
|
+
provider: 'v8',
|
|
21
|
+
reporter: ['text', 'json', 'html'],
|
|
22
|
+
exclude: ['node_modules/', 'src/test/setup.ts', 'e2e/'],
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[stack]
|
|
2
|
+
name = "vite-react"
|
|
3
|
+
extends = "web"
|
|
4
|
+
runtime = "bun"
|
|
5
|
+
scaffold = "bun create vite@latest {{name}} --template react-ts"
|
|
6
|
+
|
|
7
|
+
[dependencies.dev]
|
|
8
|
+
packages = [
|
|
9
|
+
"vite",
|
|
10
|
+
"@vitejs/plugin-react",
|
|
11
|
+
]
|
|
12
|
+
|
|
13
|
+
[scripts]
|
|
14
|
+
"dev" = "vite"
|
|
15
|
+
"build" = "tsc --noEmit && vite build"
|
|
16
|
+
"preview" = "vite preview"
|
|
17
|
+
"typecheck" = "tsc --noEmit"
|
|
18
|
+
"setup" = "./scripts/setup.sh"
|
|
19
|
+
|
|
20
|
+
[scripts.override]
|
|
21
|
+
"build" = "tsc --noEmit && vite build"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Tooling vite-react reference
|
|
2
|
+
|
|
3
|
+
> Extends: `web`. Apply web stack first.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The vite-react stack covers Vite + React + TypeScript projects: web apps and Chrome extensions. It ships golden configs for `vite.config.ts`, `vitest.config.ts` (merging from vite config), `playwright.config.ts`, and a unified `tsconfig.json` with `@/` path alias. Shared web tooling (ESLint, screenshot template, VS Code, CI, verify script) comes from the `web` layer.
|
|
8
|
+
|
|
9
|
+
## Scaffold checklist
|
|
10
|
+
|
|
11
|
+
1. Scaffold with `bunx create-vite@latest <name> --template react-ts` (web apps) or `bunx create-crxjs@latest` (Chrome extensions).
|
|
12
|
+
2. Install base and web tooling: `aitk tooling sync web .`
|
|
13
|
+
3. Install vite-react deps and configs: `aitk tooling sync vite-react .`
|
|
14
|
+
4. Extend `.claude/context/ci.md` and `.claude/context/development.md` per the web reference's extend sections plus the vite-react rows below.
|
|
15
|
+
5. Run `bun run lint:fix` then `bun run check`.
|
|
16
|
+
|
|
17
|
+
## What ships as golden configs
|
|
18
|
+
|
|
19
|
+
- `vite.config.ts`: `@vitejs/plugin-react`, `@tailwindcss/vite`, `@` path alias to `./src`, `VITE_BASE_URL` env for base path.
|
|
20
|
+
- `vitest.config.ts`: merges from `vite.config.ts`, jsdom, globals, setup file, `passWithNoTests: true`, v8 coverage.
|
|
21
|
+
- `playwright.config.ts`: all browsers, `webServer` on `bun run dev` at port 5173, trace under `use`.
|
|
22
|
+
- `tsconfig.json`: unified, `noEmit: true`, `skipLibCheck: true`, `@/` paths, `vitest/globals` and `@testing-library/jest-dom` in types.
|
|
23
|
+
|
|
24
|
+
## Chrome extension variant
|
|
25
|
+
|
|
26
|
+
When scaffolding a Chrome extension, override the installed golden configs:
|
|
27
|
+
|
|
28
|
+
- `vite.config.ts`: use `crx({ manifest })` and `zip()` from `@crxjs/vite-plugin` instead of `react()` alone. Set `server.port: 5173`, `server.strictPort: true`, `server.hmr.clientPort: 5173`, and `chrome-extension://` in CORS origins. Drop `VITE_BASE_URL`.
|
|
29
|
+
- `vitest.config.ts`: use a standalone `defineConfig` (no `mergeConfig`). crxjs plugin breaks Vitest. Declare `@vitejs/plugin-react` and `@tailwindcss/vite` directly. Add `**/release/**` to excludes and `manifest.config.ts`, `**/*.d.ts` to coverage excludes.
|
|
30
|
+
- `playwright.config.ts`: chromium-only (Firefox and WebKit cannot run extensions). Bundled `chromium` channel. No `baseURL` or `webServer`. Tests load the built extension directly from `dist/`.
|
|
31
|
+
- `e2e/fixtures.ts`: extend Playwright base `test` with `context` (persistent context loading the extension from `dist/`) and `extensionId` (extracted from service worker URL). Rename `use` to `apply` to avoid the React hooks ESLint rule. `waitForEvent('serviceworker')` blocks until the MV3 service worker registers.
|
|
32
|
+
- `manifest.config.ts`: use `defineManifest` from `@crxjs/vite-plugin`. Read `name` and `version` from `package.json`. Entry points `src/popup/index.html`, `src/sidepanel/index.html`, `src/background/index.ts`, `src/content/main.tsx`. Permissions `sidePanel`, `contentSettings`, `storage`. Icon `public/logo.png` at size 48.
|
|
33
|
+
- `screenshot` script: `bun run build && bun e2e/screenshot.ts` (no preview server).
|
|
34
|
+
- Additional gitignore entries: `*.crx`, `*.pem`, `release/`.
|
|
35
|
+
|
|
36
|
+
## Setup script
|
|
37
|
+
|
|
38
|
+
- File: `scripts/setup.sh`. Destructive: deletes `.git` and self-removes after running. Run once immediately after scaffolding.
|
|
39
|
+
- Prompt for project name, normalize to kebab-case, derive title-cased display name.
|
|
40
|
+
- Update `package.json` name and version, inject verify/clean/update scripts, remove setup.
|
|
41
|
+
- Update `<title>` tags in HTML files.
|
|
42
|
+
- Wipe `.git`, re-init, make scripts executable, commit as `chore(root): initialize <name>`.
|
|
43
|
+
|
|
44
|
+
## Development docs (extend)
|
|
45
|
+
|
|
46
|
+
Append to the `## Scripts` table:
|
|
47
|
+
|
|
48
|
+
| `bun run dev` | Start the Vite dev server on port 5173. |
|
|
49
|
+
| `bun run build` | Typecheck then build the production bundle. |
|
|
50
|
+
| `bun run preview` | Serve the built bundle locally. |
|
|
51
|
+
| `bun run typecheck` | Run `tsc --noEmit`. |
|
|
52
|
+
|
|
53
|
+
## CI docs (extend)
|
|
54
|
+
|
|
55
|
+
In `.claude/context/ci.md`, the Typecheck row's assertion reads: `` `tsc --noEmit` passes ``.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Vite
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
name: Verify
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
static-checks:
|
|
10
|
+
name: 🔍 Static Checks
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- name: Setup Node
|
|
17
|
+
uses: actions/setup-node@v4
|
|
18
|
+
with:
|
|
19
|
+
node-version: '22'
|
|
20
|
+
|
|
21
|
+
- name: Setup Bun
|
|
22
|
+
uses: oven-sh/setup-bun@v2
|
|
23
|
+
with:
|
|
24
|
+
bun-version: latest
|
|
25
|
+
|
|
26
|
+
- name: Install Dependencies
|
|
27
|
+
run: bun install --frozen-lockfile
|
|
28
|
+
|
|
29
|
+
- name: Install Shell Tools
|
|
30
|
+
run: sudo apt-get install -y shfmt shellcheck
|
|
31
|
+
|
|
32
|
+
- name: Typecheck
|
|
33
|
+
run: bun run typecheck
|
|
34
|
+
|
|
35
|
+
- name: Lint
|
|
36
|
+
run: bun run lint
|
|
37
|
+
|
|
38
|
+
- name: Check Formatting
|
|
39
|
+
run: bun run check:format
|
|
40
|
+
|
|
41
|
+
- name: Check Spelling
|
|
42
|
+
run: bun run check:spell
|
|
43
|
+
|
|
44
|
+
- name: Check Shell
|
|
45
|
+
run: bun run check:shell
|
|
46
|
+
|
|
47
|
+
unit-tests:
|
|
48
|
+
name: 🧪 Unit Tests
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- name: Checkout
|
|
52
|
+
uses: actions/checkout@v4
|
|
53
|
+
|
|
54
|
+
- name: Setup Node
|
|
55
|
+
uses: actions/setup-node@v4
|
|
56
|
+
with:
|
|
57
|
+
node-version: '22'
|
|
58
|
+
|
|
59
|
+
- name: Setup Bun
|
|
60
|
+
uses: oven-sh/setup-bun@v2
|
|
61
|
+
with:
|
|
62
|
+
bun-version: latest
|
|
63
|
+
|
|
64
|
+
- name: Install Dependencies
|
|
65
|
+
run: bun install --frozen-lockfile
|
|
66
|
+
|
|
67
|
+
- name: Run Tests
|
|
68
|
+
run: bun run test:coverage
|
|
69
|
+
|
|
70
|
+
build-verify:
|
|
71
|
+
name: 🏗️ Build
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
steps:
|
|
74
|
+
- name: Checkout
|
|
75
|
+
uses: actions/checkout@v4
|
|
76
|
+
|
|
77
|
+
- name: Setup Node
|
|
78
|
+
uses: actions/setup-node@v4
|
|
79
|
+
with:
|
|
80
|
+
node-version: '22'
|
|
81
|
+
|
|
82
|
+
- name: Setup Bun
|
|
83
|
+
uses: oven-sh/setup-bun@v2
|
|
84
|
+
with:
|
|
85
|
+
bun-version: latest
|
|
86
|
+
|
|
87
|
+
- name: Install Dependencies
|
|
88
|
+
run: bun install --frozen-lockfile
|
|
89
|
+
|
|
90
|
+
- name: Build
|
|
91
|
+
run: bun run build
|
|
92
|
+
|
|
93
|
+
e2e-tests:
|
|
94
|
+
name: 🎭 E2E Tests
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
needs: [static-checks, unit-tests, build-verify]
|
|
97
|
+
steps:
|
|
98
|
+
- name: Checkout
|
|
99
|
+
uses: actions/checkout@v4
|
|
100
|
+
|
|
101
|
+
- name: Setup Node
|
|
102
|
+
uses: actions/setup-node@v4
|
|
103
|
+
with:
|
|
104
|
+
node-version: '22'
|
|
105
|
+
|
|
106
|
+
- name: Setup Bun
|
|
107
|
+
uses: oven-sh/setup-bun@v2
|
|
108
|
+
with:
|
|
109
|
+
bun-version: latest
|
|
110
|
+
|
|
111
|
+
- name: Install Dependencies
|
|
112
|
+
run: bun install --frozen-lockfile
|
|
113
|
+
|
|
114
|
+
- name: Cache Playwright Browsers
|
|
115
|
+
id: playwright-cache
|
|
116
|
+
uses: actions/cache@v4
|
|
117
|
+
with:
|
|
118
|
+
path: ~/.cache/ms-playwright
|
|
119
|
+
key: playwright-${{ runner.os }}-${{ hashFiles('**/package.json') }}
|
|
120
|
+
|
|
121
|
+
- name: Install Playwright Chromium
|
|
122
|
+
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
|
123
|
+
run: bunx playwright install chromium
|
|
124
|
+
|
|
125
|
+
- name: Run E2E Tests
|
|
126
|
+
run: bun run test:e2e --project=chromium
|
|
127
|
+
|
|
128
|
+
- name: Upload E2E Report
|
|
129
|
+
uses: actions/upload-artifact@v4
|
|
130
|
+
if: failure()
|
|
131
|
+
with:
|
|
132
|
+
name: playwright-report
|
|
133
|
+
path: playwright-report/
|
|
134
|
+
retention-days: 7
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"recommendations": [
|
|
3
|
+
"esbenp.prettier-vscode",
|
|
4
|
+
"streetsidesoftware.code-spell-checker",
|
|
5
|
+
"mkhl.shfmt",
|
|
6
|
+
"timonwong.shellcheck",
|
|
7
|
+
"mads-hartmann.bash-ide-vscode",
|
|
8
|
+
"dbaeumer.vscode-eslint",
|
|
9
|
+
"bradlc.vscode-tailwindcss",
|
|
10
|
+
"ms-playwright.playwright",
|
|
11
|
+
"vitest.explorer"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { Page } from '@playwright/test'
|
|
2
|
+
|
|
3
|
+
const ROUTES = [{ name: 'home', path: '/', width: 1280, height: 800 }]
|
|
4
|
+
|
|
5
|
+
type State = { name: string; setup?: (page: Page) => Promise<void> }
|
|
6
|
+
const STATES: State[] = [
|
|
7
|
+
{ name: 'default' },
|
|
8
|
+
{ name: 'dark', setup: async (p) => p.emulateMedia({ colorScheme: 'dark' }) },
|
|
9
|
+
]
|
|
10
|
+
|
|
11
|
+
import { chromium } from '@playwright/test'
|
|
12
|
+
import { mkdir } from 'fs/promises'
|
|
13
|
+
import path from 'path'
|
|
14
|
+
|
|
15
|
+
const BASE_URL = process.env.SCREENSHOT_BASE_URL ?? 'http://localhost:4173'
|
|
16
|
+
const OUT_DIR = 'screenshots'
|
|
17
|
+
|
|
18
|
+
const browser = await chromium.launch()
|
|
19
|
+
await mkdir(OUT_DIR, { recursive: true })
|
|
20
|
+
|
|
21
|
+
for (const route of ROUTES) {
|
|
22
|
+
for (const state of STATES) {
|
|
23
|
+
const ctx = await browser.newContext({
|
|
24
|
+
viewport: { width: route.width, height: route.height },
|
|
25
|
+
})
|
|
26
|
+
const page = await ctx.newPage()
|
|
27
|
+
|
|
28
|
+
if (state.setup) await state.setup(page)
|
|
29
|
+
|
|
30
|
+
await page.goto(`${BASE_URL}${route.path}`)
|
|
31
|
+
await page.waitForLoadState('networkidle')
|
|
32
|
+
|
|
33
|
+
const file = path.join(OUT_DIR, `${route.name}-${state.name}.png`)
|
|
34
|
+
await page.screenshot({ path: file, fullPage: true })
|
|
35
|
+
console.log(`captured ${file}`)
|
|
36
|
+
|
|
37
|
+
await ctx.close()
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
await browser.close()
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
3
|
+
import prettier from 'eslint-config-prettier'
|
|
4
|
+
import checkFile from 'eslint-plugin-check-file'
|
|
5
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
6
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
7
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort'
|
|
8
|
+
import vitest from 'eslint-plugin-vitest'
|
|
9
|
+
import globals from 'globals'
|
|
10
|
+
import tseslint from 'typescript-eslint'
|
|
11
|
+
|
|
12
|
+
export default defineConfig([
|
|
13
|
+
globalIgnores([
|
|
14
|
+
'dist',
|
|
15
|
+
'dist-ssr',
|
|
16
|
+
'coverage',
|
|
17
|
+
'release',
|
|
18
|
+
'.claude',
|
|
19
|
+
'.vscode',
|
|
20
|
+
'.husky',
|
|
21
|
+
'test-results',
|
|
22
|
+
'playwright-report',
|
|
23
|
+
'blob-report',
|
|
24
|
+
'playwright/.cache',
|
|
25
|
+
]),
|
|
26
|
+
js.configs.recommended,
|
|
27
|
+
...tseslint.configs.recommended,
|
|
28
|
+
{
|
|
29
|
+
files: ['**/*.{ts,tsx,js,jsx}'],
|
|
30
|
+
plugins: {
|
|
31
|
+
'react-hooks': reactHooks,
|
|
32
|
+
'react-refresh': reactRefresh,
|
|
33
|
+
'simple-import-sort': simpleImportSort,
|
|
34
|
+
'check-file': checkFile,
|
|
35
|
+
},
|
|
36
|
+
languageOptions: {
|
|
37
|
+
globals: {
|
|
38
|
+
...globals.browser,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
rules: {
|
|
42
|
+
...reactHooks.configs.recommended.rules,
|
|
43
|
+
'react-refresh/only-export-components': [
|
|
44
|
+
'warn',
|
|
45
|
+
{ allowConstantExport: true },
|
|
46
|
+
],
|
|
47
|
+
'simple-import-sort/imports': 'error',
|
|
48
|
+
'simple-import-sort/exports': 'error',
|
|
49
|
+
'@typescript-eslint/no-unused-vars': [
|
|
50
|
+
'error',
|
|
51
|
+
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' },
|
|
52
|
+
],
|
|
53
|
+
'check-file/filename-naming-convention': [
|
|
54
|
+
'error',
|
|
55
|
+
{ '**/!(App).{ts,tsx}': 'KEBAB_CASE' },
|
|
56
|
+
{ ignoreMiddleExtensions: true },
|
|
57
|
+
],
|
|
58
|
+
'check-file/folder-naming-convention': [
|
|
59
|
+
'error',
|
|
60
|
+
{ 'src/**/!(__tests__)': 'KEBAB_CASE' },
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
files: ['**/*.test.{ts,tsx}', '**/*.spec.{ts,tsx}'],
|
|
66
|
+
...vitest.configs.recommended,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
files: [
|
|
70
|
+
'*.config.{js,mjs,cjs,ts}',
|
|
71
|
+
'vite.config.ts',
|
|
72
|
+
'vitest.config.ts',
|
|
73
|
+
'playwright.config.ts',
|
|
74
|
+
],
|
|
75
|
+
languageOptions: {
|
|
76
|
+
globals: {
|
|
77
|
+
...globals.node,
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
prettier,
|
|
82
|
+
])
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail
|
|
3
|
+
|
|
4
|
+
: "${PREVIEW_PORT:=4173}"
|
|
5
|
+
|
|
6
|
+
if curl -sSf "http://localhost:$PREVIEW_PORT/" >/dev/null 2>&1; then
|
|
7
|
+
echo "Port $PREVIEW_PORT already in use. Stop the listening process or set PREVIEW_PORT." >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
bun run build
|
|
12
|
+
bun run preview >/dev/null 2>&1 &
|
|
13
|
+
PREVIEW_PID=$!
|
|
14
|
+
trap 'kill "$PREVIEW_PID" 2>/dev/null; wait "$PREVIEW_PID" 2>/dev/null || true' EXIT
|
|
15
|
+
|
|
16
|
+
for _ in $(seq 1 40); do
|
|
17
|
+
if curl -sSf "http://localhost:$PREVIEW_PORT/" >/dev/null 2>&1; then
|
|
18
|
+
break
|
|
19
|
+
fi
|
|
20
|
+
sleep 0.25
|
|
21
|
+
done
|
|
22
|
+
|
|
23
|
+
if ! curl -sSf "http://localhost:$PREVIEW_PORT/" >/dev/null 2>&1; then
|
|
24
|
+
echo "Preview server not responding on port $PREVIEW_PORT after 10s." >&2
|
|
25
|
+
exit 1
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
SCREENSHOT_BASE_URL="http://localhost:$PREVIEW_PORT" bun e2e/screenshot.ts
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
set -o pipefail
|
|
4
|
+
|
|
5
|
+
GREEN='\033[0;32m'
|
|
6
|
+
RED='\033[0;31m'
|
|
7
|
+
WHITE='\033[1;37m'
|
|
8
|
+
GREY='\033[0;90m'
|
|
9
|
+
NC='\033[0m'
|
|
10
|
+
|
|
11
|
+
NESTED="${VERIFY_NESTED:-false}"
|
|
12
|
+
|
|
13
|
+
log_info() { echo -e "${GREY}│${NC} ${GREEN}✓${NC} $1"; }
|
|
14
|
+
log_error() {
|
|
15
|
+
echo -e "${GREY}│${NC} ${RED}✗${NC} $1"
|
|
16
|
+
exit 1
|
|
17
|
+
}
|
|
18
|
+
log_step() { echo -e "${GREY}│${NC}\n${GREY}├${NC} ${WHITE}$1${NC}"; }
|
|
19
|
+
|
|
20
|
+
pipe_output() { while IFS= read -r line; do echo -e "${GREY}│${NC} $line"; done; }
|
|
21
|
+
|
|
22
|
+
check_dependencies() {
|
|
23
|
+
command -v bun >/dev/null 2>&1 || log_error "bun is not installed"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
run_check() {
|
|
27
|
+
local cmd=$1
|
|
28
|
+
local err_msg=$2
|
|
29
|
+
local output
|
|
30
|
+
if ! output=$(eval "$cmd" 2>&1); then
|
|
31
|
+
echo "$output" | pipe_output
|
|
32
|
+
log_error "$err_msg"
|
|
33
|
+
fi
|
|
34
|
+
echo "$output" | pipe_output
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
main() {
|
|
38
|
+
check_dependencies
|
|
39
|
+
|
|
40
|
+
if [ "$NESTED" = false ]; then echo -e "${GREY}┌${NC}"; fi
|
|
41
|
+
|
|
42
|
+
echo -e "${GREY}├${NC} ${WHITE}Typecheck${NC}"
|
|
43
|
+
run_check "bun run typecheck" "Typecheck failed"
|
|
44
|
+
log_info "Typecheck passed"
|
|
45
|
+
|
|
46
|
+
log_step "Lint"
|
|
47
|
+
run_check "bun run lint" "Lint failed"
|
|
48
|
+
log_info "Lint passed"
|
|
49
|
+
|
|
50
|
+
log_step "Formatting"
|
|
51
|
+
run_check "bun run format" "Format failed"
|
|
52
|
+
log_info "Format applied"
|
|
53
|
+
|
|
54
|
+
log_step "Format check"
|
|
55
|
+
run_check "bun run check:format" "Format check failed"
|
|
56
|
+
log_info "Format check passed"
|
|
57
|
+
|
|
58
|
+
log_step "Spelling"
|
|
59
|
+
run_check "bun run check:spell" "Spell check failed"
|
|
60
|
+
log_info "Spell check passed"
|
|
61
|
+
|
|
62
|
+
log_step "Shell"
|
|
63
|
+
run_check "bun run check:shell" "Shell check failed"
|
|
64
|
+
log_info "Shell check passed"
|
|
65
|
+
|
|
66
|
+
log_step "Unit tests"
|
|
67
|
+
run_check "bun run test:run" "Unit tests failed"
|
|
68
|
+
log_info "Unit tests passed"
|
|
69
|
+
|
|
70
|
+
log_step "Build"
|
|
71
|
+
run_check "bun run build" "Build failed"
|
|
72
|
+
log_info "Build passed"
|
|
73
|
+
|
|
74
|
+
if [ "$NESTED" = false ]; then
|
|
75
|
+
echo -e "${GREY}└${NC}\n"
|
|
76
|
+
echo -e "${GREEN}✓ Verification passed${NC}"
|
|
77
|
+
fi
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
main "$@"
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
[stack]
|
|
2
|
+
name = "web"
|
|
3
|
+
extends = "base"
|
|
4
|
+
runtime = "bun"
|
|
5
|
+
scaffold = ""
|
|
6
|
+
|
|
7
|
+
[dependencies.dev]
|
|
8
|
+
packages = [
|
|
9
|
+
"eslint@^9",
|
|
10
|
+
"eslint-config-prettier",
|
|
11
|
+
"eslint-plugin-check-file",
|
|
12
|
+
"eslint-plugin-react-hooks",
|
|
13
|
+
"eslint-plugin-react-refresh",
|
|
14
|
+
"eslint-plugin-simple-import-sort",
|
|
15
|
+
"eslint-plugin-vitest",
|
|
16
|
+
"globals",
|
|
17
|
+
"typescript-eslint",
|
|
18
|
+
"@eslint/js",
|
|
19
|
+
"typescript",
|
|
20
|
+
"react",
|
|
21
|
+
"react-dom",
|
|
22
|
+
"@types/react",
|
|
23
|
+
"@types/react-dom",
|
|
24
|
+
"@types/node",
|
|
25
|
+
"vitest@^3",
|
|
26
|
+
"@vitest/coverage-v8@^3",
|
|
27
|
+
"@vitest/ui@^3",
|
|
28
|
+
"jsdom",
|
|
29
|
+
"@testing-library/react",
|
|
30
|
+
"@testing-library/jest-dom",
|
|
31
|
+
"@testing-library/user-event",
|
|
32
|
+
"@playwright/test",
|
|
33
|
+
"tailwindcss",
|
|
34
|
+
"@tailwindcss/vite",
|
|
35
|
+
"prettier-plugin-tailwindcss",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[scripts]
|
|
39
|
+
"lint" = "eslint . --max-warnings 0"
|
|
40
|
+
"lint:fix" = "eslint . --fix --max-warnings 0"
|
|
41
|
+
"test" = "vitest"
|
|
42
|
+
"test:run" = "vitest run --reporter=verbose"
|
|
43
|
+
"test:ui" = "vitest --ui"
|
|
44
|
+
"test:coverage" = "vitest run --coverage"
|
|
45
|
+
"test:e2e" = "playwright test"
|
|
46
|
+
"test:e2e:ui" = "playwright test --ui"
|
|
47
|
+
"test:e2e:report" = "playwright show-report"
|
|
48
|
+
"check:full" = "./scripts/verify.sh && bun run test:e2e"
|
|
49
|
+
|
|
50
|
+
[scripts.override]
|
|
51
|
+
"screenshot" = "bash scripts/screenshot.sh"
|
|
52
|
+
|
|
53
|
+
[gitignore]
|
|
54
|
+
"# Build" = ["dist/"]
|
|
55
|
+
"# Coverage" = ["coverage/"]
|
|
56
|
+
"# Playwright" = ["test-results/", "playwright-report/", "blob-report/", "playwright/.cache/", "screenshots/"]
|
|
57
|
+
"# VSCode" = [".vscode/*", "!.vscode/extensions.json", "!.vscode/settings.json"]
|