chore: initialize portfolio toolchain

This commit is contained in:
2026-09-02 00:18:47 +03:00
parent 33d63a8513
commit 51af112e21
10 changed files with 2921 additions and 1 deletions

13
.gitignore vendored
View File

@@ -1,2 +1,13 @@
.superpowers/sdd/ node_modules/
dist/
dist-ssr/
coverage/
playwright-report/
test-results/
.env*
config/site.production.json
content/private/
inputs/original-assets/
*.map
.worktrees/ .worktrees/
.superpowers/sdd/

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22.22.1

12
index.html Normal file
View File

@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Portfolio</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/entry-client.ts"></script>
</body>
</html>

2797
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

41
package.json Normal file
View File

@@ -0,0 +1,41 @@
{
"name": "portfolio-phase-1",
"version": "1.0.0",
"description": "",
"type": "module",
"directories": {
"doc": "docs"
},
"scripts": {
"dev": "vite --host 127.0.0.1",
"typecheck": "vue-tsc --noEmit",
"test:unit": "vitest run",
"test:browser": "playwright test",
"build:client": "vite build --outDir dist/client --manifest",
"build:ssr": "vite build --ssr src/entry-server.ts --outDir dist-ssr",
"prerender": "node scripts/prerender.mjs",
"build:preview": "npm run typecheck && npm run test:unit && npm run build:client && npm run build:ssr && npm run prerender -- --config config/site.preview.json"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"three": "^0.185.1",
"vue": "^3.5.42",
"zod": "^4.5.4"
},
"devDependencies": {
"@axe-core/playwright": "^4.13.0",
"@playwright/test": "^1.62.1",
"@vitejs/plugin-vue": "^6.0.8",
"@vue/server-renderer": "^3.5.42",
"@vue/test-utils": "^2.5.0",
"eslint": "^10.9.1",
"happy-dom": "^20.12.0",
"prettier": "^3.9.6",
"typescript": "^5.9.3",
"vite": "^8.2.2",
"vitest": "^4.1.11",
"vue-tsc": "^3.3.11"
}
}

9
playwright.config.ts Normal file
View File

@@ -0,0 +1,9 @@
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: './tests/browser',
projects: [
{ name: 'desktop-chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'mobile-chromium', use: { ...devices['Pixel 5'] } },
],
});

View File

@@ -0,0 +1,7 @@
import { describe, expect, it } from 'vitest';
describe('toolchain', () => {
it('runs TypeScript tests', () => {
expect(import.meta.env.MODE).toBe('test');
});
});

19
tsconfig.json Normal file
View File

@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "ES2023",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true,
"lib": ["ES2023", "DOM", "DOM.Iterable"],
"jsx": "preserve",
"resolveJsonModule": true,
"esModuleInterop": true,
"allowImportingTsExtensions": true,
"types": ["vite/client"],
"baseUrl": ".",
"paths": { "@/*": ["src/*"] }
},
"include": ["src/**/*.ts", "src/**/*.vue", "tests/**/*.ts", "vite.config.ts", "vitest.config.ts", "playwright.config.ts"]
}

10
vite.config.ts Normal file
View File

@@ -0,0 +1,10 @@
import { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [vue()],
resolve: {
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
},
});

13
vitest.config.ts Normal file
View File

@@ -0,0 +1,13 @@
import { defineConfig } from 'vitest/config';
import { fileURLToPath, URL } from 'node:url';
export default defineConfig({
resolve: {
alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) },
},
test: {
environment: 'happy-dom',
globals: false,
coverage: { include: ['src/**/*.{ts,vue}'] },
},
});