Skip to content

Commit c6efd4e

Browse files
authored
Merge pull request #25 from obilodeau/js-to-ts
Converted frontend from Javascript to Typescript
2 parents 0089b6c + f3f5b4a commit c6efd4e

28 files changed

Lines changed: 670 additions & 203 deletions

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# the user has activated it (or has direnv loaded). `make venv` creates it.
33
export PATH := $(CURDIR)/.venv/bin:$(PATH)
44

5-
.PHONY: ci lint format format-check test install-dev run venv init build
5+
.PHONY: ci lint format format-check test install-dev run venv init build frontend-lint frontend-type-check
66

77
# Run all CI checks — called by GitHub Actions.
8-
ci: lint format-check frontend-lint test
8+
ci: lint format-check frontend-lint frontend-type-check test
99

1010
# ── Python ──────────────────────────────────────────────────────────────────
1111

@@ -27,6 +27,9 @@ test:
2727
frontend-lint:
2828
npm --prefix frontend run lint
2929

30+
frontend-type-check:
31+
npm --prefix frontend run type-check
32+
3033
# ── Dev setup ────────────────────────────────────────────────────────────────
3134

3235
venv:

frontend/package-lock.json

Lines changed: 145 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
"license": "GPL-3.0-or-later",
77
"scripts": {
88
"dev": "vite",
9-
"build": "vite build",
9+
"build": "vue-tsc --noEmit && vite build",
1010
"preview": "vite preview",
11-
"lint": "prettier --check \"src/**/*.{js,vue}\""
11+
"lint": "prettier --check \"src/**/*.{ts,vue}\"",
12+
"type-check": "vue-tsc --noEmit"
1213
},
1314
"dependencies": {
1415
"@fortawesome/fontawesome-free": "^6.5.2",
@@ -18,8 +19,12 @@
1819
"vue-router": "^4.4.3"
1920
},
2021
"devDependencies": {
22+
"@types/node": "^25.9.1",
2123
"@vitejs/plugin-vue": "^6.0.6",
24+
"@vue/tsconfig": "^0.9.1",
2225
"prettier": "^3.3.3",
23-
"vite": "^8.0.10"
26+
"typescript": "^6.0.3",
27+
"vite": "^8.0.10",
28+
"vue-tsc": "^3.3.1"
2429
}
2530
}

frontend/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
2-
<script setup>
2+
<script setup lang="ts">
33
import { onBeforeMount } from "vue";
44
import { useGameStore } from "@/stores/game";
55

frontend/src/api.js

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)