diff --git a/README.md b/README.md index 1568ac800..81dab7397 100644 --- a/README.md +++ b/README.md @@ -44,16 +44,16 @@ cd blitzkit > [!NOTE] > There is a closed source submodule under `packages/closed` that you can safely ignore. This sole purpose of this submodule is to provide `dvp.ts`, a proprietary Wargaming game asset tree compression tool. You will not need this at any point. -Then, download the dependencies with Bun. +Then, grand execution permission to the setup script. ```bash -bun install +chmod +x scripts/setup.sh ``` -Finally, compile the proto files into TypeScript. +Finally, run the setup script. ```bash -build build-protos +scripts/setup.sh ``` ## Developing: Environment diff --git a/bun.lock b/bun.lock index 22cfe2bfd..167931c2e 100644 --- a/bun.lock +++ b/bun.lock @@ -55,7 +55,6 @@ "packages/scripts": { "name": "@blitzkit/scripts", "dependencies": { - "@blitzkit/closed": "workspace:*", "@blitzkit/core": "workspace:*", "@blitzkit/i18n": "workspace:*", "@gltf-transform/core": "^4.2.1", @@ -1643,8 +1642,6 @@ "jimp": ["jimp@1.6.0", "", { "dependencies": { "@jimp/core": "1.6.0", "@jimp/diff": "1.6.0", "@jimp/js-bmp": "1.6.0", "@jimp/js-gif": "1.6.0", "@jimp/js-jpeg": "1.6.0", "@jimp/js-png": "1.6.0", "@jimp/js-tiff": "1.6.0", "@jimp/plugin-blit": "1.6.0", "@jimp/plugin-blur": "1.6.0", "@jimp/plugin-circle": "1.6.0", "@jimp/plugin-color": "1.6.0", "@jimp/plugin-contain": "1.6.0", "@jimp/plugin-cover": "1.6.0", "@jimp/plugin-crop": "1.6.0", "@jimp/plugin-displace": "1.6.0", "@jimp/plugin-dither": "1.6.0", "@jimp/plugin-fisheye": "1.6.0", "@jimp/plugin-flip": "1.6.0", "@jimp/plugin-hash": "1.6.0", "@jimp/plugin-mask": "1.6.0", "@jimp/plugin-print": "1.6.0", "@jimp/plugin-quantize": "1.6.0", "@jimp/plugin-resize": "1.6.0", "@jimp/plugin-rotate": "1.6.0", "@jimp/plugin-threshold": "1.6.0", "@jimp/types": "1.6.0", "@jimp/utils": "1.6.0" } }, "sha512-YcwCHw1kiqEeI5xRpDlPPBGL2EOpBKLwO4yIBJcXWHPj5PnA5urGq0jbyhM5KoNpypQ6VboSoxc9D8HyfvngSg=="], - "jiti": ["jiti@2.6.0", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-VXe6RjJkBPj0ohtqaO8vSWP3ZhAKo66fKrFNCll4BTcwljPLz03pCbaNKfzGP5MbrCYcbJ7v0nOYYwUzTEIdXQ=="], - "jpeg-js": ["jpeg-js@0.4.4", "", {}, "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], @@ -1951,7 +1948,7 @@ "potpack": ["potpack@1.0.2", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="], - "prettier": ["prettier@3.6.2", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ=="], + "prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="], "pretty-bytes": ["pretty-bytes@6.1.1", "", {}, "sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ=="], @@ -2733,8 +2730,6 @@ "wrap-ansi/strip-ansi": ["strip-ansi@7.1.2", "", { "dependencies": { "ansi-regex": "^6.0.1" } }, "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA=="], - "yaml-language-server/prettier": ["prettier@2.8.7", "", { "bin": { "prettier": "bin-prettier.js" } }, "sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw=="], - "yaml-language-server/request-light": ["request-light@0.5.8", "", {}, "sha512-3Zjgh+8b5fhRJBQZoy+zbVKpAQGLyka0MPgW3zruTF4dFFJ8Fqcfu9YsAvi/rvdcaTeWG3MkbZv4WKxAn/84Lg=="], "yaml-language-server/vscode-languageserver": ["vscode-languageserver@7.0.0", "", { "dependencies": { "vscode-languageserver-protocol": "3.16.0" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw=="], diff --git a/package.json b/package.json index 906cc8b51..f085afec5 100644 --- a/package.json +++ b/package.json @@ -3,16 +3,7 @@ "version": "1.33.0", "license": "BlitzKit License", "private": true, - "scripts": { - "dev": "cd packages/website && bun --bun run dev", - "build": "cd packages/website && bun --bun run build", - "discover-ids": "cd packages/scripts && bun run discover-ids", - "build-protos": "cd packages/scripts && bun run build-protos", - "record-performance": "cd packages/scripts && bun run record-performance", - "download-client": "cd packages/scripts && bun run download-client", - "download-smart-dlc": "cd packages/closed && bun run download-smart-dlc", - "clean-astro": "rm -rf packages/website/.astro packages/website/node_modules/.astro packages/website/node_modules/.vite", - "vfs": "cd packages/scripts && bun run vfs" + "scripts": { }, "type": "module", "workspaces": [ diff --git a/scripts/build-protos.sh b/scripts/build-protos.sh new file mode 100755 index 000000000..e87441ec5 --- /dev/null +++ b/scripts/build-protos.sh @@ -0,0 +1,2 @@ +cd packages/scripts +bun run build-protos \ No newline at end of file diff --git a/scripts/build-website.sh b/scripts/build-website.sh new file mode 100755 index 000000000..6c54b0141 --- /dev/null +++ b/scripts/build-website.sh @@ -0,0 +1,2 @@ +cd packages/website +bun --bun run build \ No newline at end of file diff --git a/scripts/clean-astro.sh b/scripts/clean-astro.sh new file mode 100755 index 000000000..9ecfeea66 --- /dev/null +++ b/scripts/clean-astro.sh @@ -0,0 +1,4 @@ +rm -rf \ + packages/website/.astro \ + packages/website/node_modules/.astro \ + packages/website/node_modules/.vite \ No newline at end of file diff --git a/scripts/dev.sh b/scripts/dev.sh new file mode 100755 index 000000000..64ce8eb3c --- /dev/null +++ b/scripts/dev.sh @@ -0,0 +1,2 @@ +cd packages/website +bun --bun run dev \ No newline at end of file diff --git a/scripts/discover-ids.sh b/scripts/discover-ids.sh new file mode 100755 index 000000000..63d9c727f --- /dev/null +++ b/scripts/discover-ids.sh @@ -0,0 +1,2 @@ +cd packages/scripts +bun run discover-ids \ No newline at end of file diff --git a/scripts/download-client.sh b/scripts/download-client.sh new file mode 100755 index 000000000..393e88009 --- /dev/null +++ b/scripts/download-client.sh @@ -0,0 +1,2 @@ +cd packages/scripts +bun run download-client \ No newline at end of file diff --git a/scripts/download-smart-dlc.sh b/scripts/download-smart-dlc.sh new file mode 100755 index 000000000..10889d2c9 --- /dev/null +++ b/scripts/download-smart-dlc.sh @@ -0,0 +1,2 @@ +cd packages/closed +bun run download-smart-dlc \ No newline at end of file diff --git a/scripts/lint.sh b/scripts/lint.sh new file mode 100755 index 000000000..d8eeef303 --- /dev/null +++ b/scripts/lint.sh @@ -0,0 +1,3 @@ +for dir in packages/*/; do + (cd "$dir" && bun --bun run lint) +done \ No newline at end of file diff --git a/scripts/record-performance.sh b/scripts/record-performance.sh new file mode 100755 index 000000000..e91437c3f --- /dev/null +++ b/scripts/record-performance.sh @@ -0,0 +1,2 @@ +cd packages/scripts +bun run record-performance \ No newline at end of file diff --git a/scripts/setup.sh b/scripts/setup.sh new file mode 100755 index 000000000..5f89e1ae5 --- /dev/null +++ b/scripts/setup.sh @@ -0,0 +1,2 @@ +chmod +x scripts/*.sh +bun install diff --git a/scripts/vfs.sh b/scripts/vfs.sh new file mode 100755 index 000000000..310ee4562 --- /dev/null +++ b/scripts/vfs.sh @@ -0,0 +1,2 @@ +cd packages/scripts +bun run vfs \ No newline at end of file