diff --git a/package.json b/package.json index 28ca9bc..7a1d655 100755 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dist" ], "scripts": { - "build": "tsc --outDir dist --declaration --emitDeclarationOnly false && node -e \"const fs = require('node:fs'); fs.mkdirSync('dist', { recursive: true }); fs.copyFileSync('src/game.css', 'dist/game.css');\"", + "build": "tsc --outDir dist --declaration --emitDeclarationOnly false && node -e \"const fs = require('node:fs'); fs.mkdirSync('dist', { recursive: true }); fs.copyFileSync('src/game.css', 'dist/game.css'); fs.copyFileSync('package.json', 'dist/package.json');\"", "prepublishOnly": "npm run build" }, "peerDependencies": { diff --git a/src/gameInfo.ts b/src/gameInfo.ts index ac13cff..9d156c0 100644 --- a/src/gameInfo.ts +++ b/src/gameInfo.ts @@ -1,4 +1,7 @@ +import { version } from '../package.json'; + export const gameInfo = { + version, name: 'VIMazing Snake', description: 'Classic snake game with VIM-style hjkl controls', diff --git a/tsconfig.json b/tsconfig.json index 14cd137..ed0adfd 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,8 @@ "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true, - "noUncheckedSideEffectImports": true + "noUncheckedSideEffectImports": true, + "rootDir": "./src" }, "include": ["src", "global.d.ts"], "exclude": ["example"]