Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ coverage

# Vitest
__screenshots__/

.vite-ssg-temp/
8 changes: 1 addition & 7 deletions .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": true,
"printWidth": 100,
"printWidth": 90,
"overrides": [
{
"files": ["**/*.vue"],
Expand All @@ -16,12 +16,6 @@
"singleQuote": false,
"printWidth": 120
}
},
{
"files": ["**/*.js"],
"options": {
"tabWidth": 4
}
}
]
}
38 changes: 22 additions & 16 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -23,21 +25,25 @@ 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 `<script>` in `index.html`) applies `data-bs-theme` on `<html>` before Vue mounts; Vue's `ThemeSwitch.vue` toggles it
- 404.html stores `location.href` in `sessionStorage.redirect`; `index.html` replays it (GitHub Pages SPA workaround)
- `src/config/apps.ts` — list of apps
- `src/router/index.ts` — vue router

## Environment

Copy `.env` from the template (not committed). Vars are `VITE_TITLE`, `VITE_*_URL`, etc. Injected via `%VITE_TITLE%` in `index.html` and `import.meta.env.VITE_*` in code.

## CI

- `pages.yaml`: push to `master` → npm build → deploy to GitHub Pages + optional Cloudflare purge + Algolia crawl
Workflows in: `.github/workflows`

- `pages.yaml`: push to `master` → npm build → deploy to GitHub Pages
- `preview.yaml`: push non-master → npm build → deploy to `https://dev-static.cssnr.com/`
- `lint.yaml`: push/PR to master → lint check

Expand Down
Loading
Loading