mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-06 01:15:42 -06:00
chore: setup --debug/--release args for web build script & recipe, fix test lint
This commit is contained in:
5
Justfile
5
Justfile
@@ -40,5 +40,6 @@ samply:
|
||||
samply record ./target/profile/pacman{{ binary_extension }}
|
||||
|
||||
# Build the project for Emscripten
|
||||
web:
|
||||
bun run web.build.ts; caddy file-server --root dist
|
||||
web *args:
|
||||
bun run web.build.ts {{args}};
|
||||
caddy file-server --root dist
|
||||
|
||||
@@ -50,7 +50,7 @@ fn test_atlas_mapper_multiple_frames() {
|
||||
assert!(mapper.frames.contains_key("tile1"));
|
||||
assert!(mapper.frames.contains_key("tile2"));
|
||||
assert!(!mapper.frames.contains_key("tile3"));
|
||||
assert!(mapper.frames.get("nonexistent").is_none());
|
||||
assert!(!mapper.frames.contains_key("nonexistent"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
15
web.build.ts
15
web.build.ts
@@ -501,7 +501,6 @@ async function activateEmsdk(
|
||||
|
||||
return { vars };
|
||||
}
|
||||
|
||||
async function main() {
|
||||
// Print the OS detected
|
||||
logger.debug(
|
||||
@@ -515,7 +514,19 @@ async function main() {
|
||||
.exhaustive()
|
||||
);
|
||||
|
||||
const release = process.env.RELEASE !== "0";
|
||||
// Parse command line args for build mode
|
||||
const args = process.argv.slice(2);
|
||||
let release = true; // Default to release mode
|
||||
|
||||
for (let i = 0; i < args.length; i++) {
|
||||
const arg = args[i];
|
||||
if (arg === "-d" || arg === "--debug") {
|
||||
release = false;
|
||||
} else if (arg === "-r" || arg === "--release") {
|
||||
release = true;
|
||||
}
|
||||
}
|
||||
|
||||
const emsdkDir = resolve("./emsdk");
|
||||
|
||||
// Activate the Emscripten SDK (returns null if already activated)
|
||||
|
||||
Reference in New Issue
Block a user