chore: use yarn (fleet standard) + declare vite devDependency
- Switch package manager from npm to yarn 1.22.22 (pinned via packageManager, matches PressV/sp-ui-kit): remove package-lock.json, add yarn.lock (v1). - Add "vite" as an explicit devDependency. npm 7+ auto-installed it as a peer of @vitejs/plugin-vue / @tailwindcss/vite, which masked the missing declaration; a clean `yarn install` (no peer auto-install) needs it explicit or the tsc build fails to resolve 'vite' / 'vite/client'. - README: npm -> yarn (+ `corepack enable`). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aa115a0b8d
commit
bd9103c172
20
README.md
20
README.md
@ -19,18 +19,25 @@ scopes only the "Fertig" figures. Run `npm run dev` to see it.
|
|||||||
|
|
||||||
## Quick start (standalone dev)
|
## Quick start (standalone dev)
|
||||||
|
|
||||||
|
Package manager is **yarn 1.22.22** (pinned via `packageManager`; matches PressV /
|
||||||
|
the fleet). `corepack` provides it — no global yarn install needed.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# 0) let corepack honour the pinned yarn (one-time per machine)
|
||||||
|
corepack enable
|
||||||
|
|
||||||
# 1) auth for the private @sp-ui-kit design-token package (one-time)
|
# 1) auth for the private @sp-ui-kit design-token package (one-time)
|
||||||
cp .npmrc.example .npmrc # then paste a Gitea PAT with "package: Read" scope
|
cp .npmrc.example .npmrc # then paste a Gitea PAT with "package: Read" scope
|
||||||
|
# (yarn v1 reads .npmrc for the scoped registry)
|
||||||
|
|
||||||
# 2) install + run
|
# 2) install + run
|
||||||
npm install
|
yarn install
|
||||||
npm run dev # http://localhost:5173/module/temper_overview/
|
yarn dev # http://localhost:5173/module/temper_overview/
|
||||||
```
|
```
|
||||||
|
|
||||||
With **no gateway backend running**, the store falls back to **bundled sample data**
|
With **no gateway backend running**, the store falls back to **bundled sample data**
|
||||||
(`src/data/sample.ts`), so `npm run dev` shows the full design immediately (a
|
(`src/data/sample.ts`), so `yarn dev` shows the full design immediately (a
|
||||||
`DEMO-DATEN` tag appears in the header). `npm run build` → `dist/` (committed).
|
`DEMO-DATEN` tag appears in the header). `yarn build` → `dist/` (committed).
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -65,9 +72,8 @@ Restart the gateway; the log shows `loaded module: temper_overview`. Smoke-test
|
|||||||
(mind the trailing slash): `http://localhost:8800/module/temper_overview/` and
|
(mind the trailing slash): `http://localhost:8800/module/temper_overview/` and
|
||||||
`…/api/overview`.
|
`…/api/overview`.
|
||||||
|
|
||||||
> **Deploy rule:** always `npm run build` and **commit `dist/`** when the app
|
> **Deploy rule:** always `yarn build` and **commit `dist/`** when the app changes,
|
||||||
> changes, then bump the submodule pin in the gateway repo. Never build on the
|
> then bump the submodule pin in the gateway repo. Never build on the gateway host.
|
||||||
> gateway host.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
2313
package-lock.json
generated
2313
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,6 +3,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"packageManager": "yarn@1.22.22",
|
||||||
"description": "Temper-Linie · Live-Übersicht — a login-free whole-line temper overview SPA, served by the SPRO gateway under /module/temper_overview and embedded into Grafana via iframe.",
|
"description": "Temper-Linie · Live-Übersicht — a login-free whole-line temper overview SPA, served by the SPRO gateway under /module/temper_overview and embedded into Grafana via iframe.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
@ -29,6 +30,7 @@
|
|||||||
"@vue/tsconfig": "^0.9.0",
|
"@vue/tsconfig": "^0.9.0",
|
||||||
"tailwindcss": "^4.2.2",
|
"tailwindcss": "^4.2.2",
|
||||||
"typescript": "~5.9.3",
|
"typescript": "~5.9.3",
|
||||||
|
"vite": "^8.0.1",
|
||||||
"vue-tsc": "^3.2.5"
|
"vue-tsc": "^3.2.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user