snippetbashTip
pygbag — Package Pygame projects as WebAssembly to run in web browsers. More information: <https://github.com
Viewed 0 times
commandrunpygamewebassemblypygbagcliprojectspackage
Problem
How to use the
pygbag command: Package Pygame projects as WebAssembly to run in web browsers. More information: <https://github.com/pygame-web/pygbag#pygbag>.Solution
pygbag — Package Pygame projects as WebAssembly to run in web browsers. More information: <https://github.com/pygame-web/pygbag#pygbag>.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 {{path/to/project_folder}} --buildPackage with a specific template:
pygbag {{path/to/project_folder}} --template {{template_name.tmpl}}Package and create a ZIP archive for <https://itch.io>:
pygbag {{path/to/project_folder}} --archivePackage with optimization turned off:
pygbag {{path/to/project_folder}} --no_optSpecify a custom port for the test server:
pygbag {{path/to/project_folder}} --port {{8080}}Display help:
pygbag {{[-h|--help]}}Code Snippets
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 {{path/to/project_folder}} --buildPackage with a specific template
pygbag {{path/to/project_folder}} --template {{template_name.tmpl}}Package and create a ZIP archive for <https://itch.io>
pygbag {{path/to/project_folder}} --archiveContext
tldr-pages: common/pygbag
Revisions (0)
No revisions yet.