diff --git a/.gitignore b/.gitignore index a3f7a51..790169d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ coverage # Vitest __screenshots__/ + +.vite-ssg-temp/ diff --git a/.prettierrc.json b/.prettierrc.json index 1bf34d7..577fddf 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/prettierrc", "semi": false, "singleQuote": true, - "printWidth": 100, + "printWidth": 90, "overrides": [ { "files": ["**/*.vue"], @@ -16,12 +16,6 @@ "singleQuote": false, "printWidth": 120 } - }, - { - "files": ["**/*.js"], - "options": { - "tabWidth": 4 - } } ] } diff --git a/AGENTS.md b/AGENTS.md index 6a46d7b..5510d24 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,18 +1,20 @@ -# cssnr-vue (cssnr.github.io) +# Agents - cssnr-vue (cssnr.github.io) Vue 3 SPA — GitHub Pages org site showcasing CSSNR projects. +Production Site: https://cssnr.github.io/ + ## Commands -| Command | Action | -| ------------------------ | --------------------------------------- | -| `npm run dev` | Dev server at localhost:5173 | -| `npm run tsc` | Typecheck via `vue-tsc --build` | -| `npm run build` | `tsc` then `vite build` (prebuild hook) | -| `npm run lint` | ESLint 10 with `--cache --fix` | -| `npm run lint:check` | ESLint read-only | -| `npm run prettier` | `npx prettier --write .` | -| `npm run prettier:check` | Prettier read-only | +| Command | Action | +| ------------------------ | ---------------------------------- | +| `npm run dev` | Dev server at localhost:5173 | +| `npm run tsc` | TypeScript check `vue-tsc --build` | +| `npm run build` | `tsc` then `vite-ssg build` | +| `npm run lint` | ESLint Write `--cache --fix` | +| `npm run lint:check` | ESLint Check | +| `npm run prettier` | Prettier Write | +| `npm run prettier:check` | Prettier Check | Run `lint` before `tsc` before `build`. No test framework exists. @@ -23,13 +25,15 @@ Run `lint` before `tsc` before `build`. No test framework exists. - Lint CI checks: `lint:check` + `prettier:check` + yamllint + actionlint - Path alias `@/` → `src/` +| Script | Command | +| ---------- | ------------------------------------- | +| yamllint | `yamllint -c .github/yamllint.yaml .` | +| actionlint | `actionlint` | + ## Architecture -- **No state management (Pinia/Vuex)** — all data is static, imported from `src/config/` -- `src/config/apps.ts` (~1068 lines) defines 9 categories of ~80+ projects — the site's core data -- `src/router/index.ts` — 3 routes: `/` (Home), `/about` (lazy), catch-all redirects to `/` -- Theme: `public/theme.js` (blocking ` diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index a97daf8..f31f051 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,7 +1,10 @@ diff --git a/src/views/NotFoundView.vue b/src/views/NotFoundView.vue new file mode 100644 index 0000000..a10a25c --- /dev/null +++ b/src/views/NotFoundView.vue @@ -0,0 +1,30 @@ + + + + + Not Found + The page you were looking for could not be found. + + + + + + {{ meta?.name }} + + + + + + + Home Page + + + diff --git a/vite.config.ts b/vite.config.ts index ba2ef9d..aa5d244 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,24 +1,24 @@ import { fileURLToPath, URL } from 'node:url' -import { copyFileSync } from 'node:fs' import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' +// noinspection ES6UnusedImports +import type {} from 'vite-ssg' // https://vite.dev/config/ export default defineConfig({ // base: '/cssnr-vue/', - plugins: [ - vue(), - { - name: 'copy-index-to-404', - closeBundle() { - copyFileSync('dist/index.html', 'dist/404.html') - }, - }, - ], + plugins: [vue()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)), }, }, server: { allowedHosts: true }, + ssgOptions: { + mock: true, + script: 'async', + }, + ssr: { + noExternal: ['bootstrap'], + }, })
The page you were looking for could not be found.
+ Home Page +