From 0922664c99dc883e20d01c3dc48525f49be729f7 Mon Sep 17 00:00:00 2001 From: kekwlboy12469 Date: Sun, 5 Oct 2025 19:07:36 +0530 Subject: [PATCH 1/3] pygbag: add page Add tldr page for pygbag - a tool for packaging Pygame games as WebAssembly. pygbag allows Python/Pygame games to run directly in web browsers without requiring users to install anything. It compiles projects to WebAssembly and includes a built-in test server for local testing. Closes #17002 --- pages/common/pygbag.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pages/common/pygbag.md diff --git a/pages/common/pygbag.md b/pages/common/pygbag.md new file mode 100644 index 00000000000000..a2df7ad958e25d --- /dev/null +++ b/pages/common/pygbag.md @@ -0,0 +1,36 @@ +# pygbag + +> Package Pygame projects as WebAssembly to run in web browsers. +> More information: . + +- Package a Pygame project and start a local test server: + +`pygbag {{path/to/project_folder}}` + +- Package using Python module syntax: + +`python -m pygbag {{path/to/project_folder}}` + +- Package and build without starting the test server: + +`pygbag --build {{path/to/project_folder}}` + +- Package with a specific template: + +`pygbag --template {{template_name.tmpl}} {{path/to/project_folder}}` + +- Package and create a ZIP archive for itch.io: + +`pygbag --archive {{path/to/project_folder}}` + +- Package with optimization turned off: + +`pygbag --no_opt {{path/to/project_folder}}` + +- Specify a custom port for the test server: + +`pygbag --port {{8080}} {{path/to/project_folder}}` + +- Display help information: + +`pygbag --help` From 33cb69e6b30389d70a200ad1e009b33a4ee59941 Mon Sep 17 00:00:00 2001 From: kekwlboy12469 Date: Sun, 5 Oct 2025 21:58:02 +0530 Subject: [PATCH 2/3] Update pages/common/pygbag.md Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/common/pygbag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/pygbag.md b/pages/common/pygbag.md index a2df7ad958e25d..6c22516d179b79 100644 --- a/pages/common/pygbag.md +++ b/pages/common/pygbag.md @@ -33,4 +33,4 @@ - Display help information: -`pygbag --help` +`pygbag {{[-h|--help]}}` From 17edbf005a7eaab71951141fdc0216b2c2194b32 Mon Sep 17 00:00:00 2001 From: kekwlboy12469 Date: Mon, 6 Oct 2025 21:26:04 +0530 Subject: [PATCH 3/3] Update pygbag.md What I Fixed Based on the tldr style guide PR #18491 that standardized argument order, I made these corrections: Rule: Positional arguments (like {{path/to/project_folder}}) must come BEFORE option flags and options with arguments. --- pages/common/pygbag.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/common/pygbag.md b/pages/common/pygbag.md index 6c22516d179b79..7aee649f011782 100644 --- a/pages/common/pygbag.md +++ b/pages/common/pygbag.md @@ -13,24 +13,24 @@ - Package and build without starting the test server: -`pygbag --build {{path/to/project_folder}}` +`pygbag {{path/to/project_folder}} --build` - Package with a specific template: -`pygbag --template {{template_name.tmpl}} {{path/to/project_folder}}` +`pygbag {{path/to/project_folder}} --template {{template_name.tmpl}}` - Package and create a ZIP archive for itch.io: -`pygbag --archive {{path/to/project_folder}}` +`pygbag {{path/to/project_folder}} --archive` - Package with optimization turned off: -`pygbag --no_opt {{path/to/project_folder}}` +`pygbag {{path/to/project_folder}} --no_opt` - Specify a custom port for the test server: -`pygbag --port {{8080}} {{path/to/project_folder}}` +`pygbag {{path/to/project_folder}} --port {{8080}}` - Display help information: -`pygbag {{[-h|--help]}}` +`pygbag --help`