Convert the React app from JS/JSX to TS/TSX and add type-checking: - Rename sheet-main, book, BookIndex, CharacterSheet to .ts(x) and add types (Fields, Bond, ClassEntry, Spell, CheckMap; loose SavedData for abbreviated save/share payloads) - Add globals.d.ts for CSS imports and the __BOOK_DATA__ global - tsconfig.json (strict, noEmit) and a 'typecheck' npm script - webpack: handle ts/tsx via @babel/preset-typescript - Enforce types with a tracked pre-commit hook (core.hooksPath), wired up automatically via the 'prepare' script - Update stale Justfile format target for the src/ layout Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
895 B
JSON
31 lines
895 B
JSON
{
|
|
"scripts": {
|
|
"build": "webpack --mode=production",
|
|
"dev": "webpack serve --mode=development",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepare": "git config core.hooksPath .githooks || true"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.29.7",
|
|
"@babel/preset-react": "^7.29.7",
|
|
"@babel/preset-typescript": "^7.29.7",
|
|
"@babel/register": "^7.29.7",
|
|
"@types/react": "^19.2.17",
|
|
"@types/react-dom": "^19.2.3",
|
|
"babel-loader": "^10.1.1",
|
|
"copy-webpack-plugin": "^14.0.0",
|
|
"css-loader": "^7.1.4",
|
|
"css-minimizer-webpack-plugin": "^8.0.0",
|
|
"html-webpack-plugin": "^5.6.7",
|
|
"mini-css-extract-plugin": "^2.10.2",
|
|
"prettier": "^3.8.3",
|
|
"react": "^19.2.7",
|
|
"react-dom": "^19.2.7",
|
|
"style-loader": "^4.0.0",
|
|
"typescript": "^6.0.3",
|
|
"webpack": "^5.107.2",
|
|
"webpack-cli": "^7.0.3",
|
|
"webpack-dev-server": "^5.2.4"
|
|
}
|
|
}
|