From 4647e6ff3954a20d7bf2a7bae8a1d0cfeed0db3b Mon Sep 17 00:00:00 2001 From: ShivamKR12 <161696093+ShivamKR12@users.noreply.github.com> Date: Sat, 9 May 2026 23:59:31 +0530 Subject: [PATCH] Enhance README with pygbag.ini configuration details Added detailed information about pygbag.ini configuration, including its purpose, file format, syntax, and an example. --- wiki/pygbag-configuration/README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/wiki/pygbag-configuration/README.md b/wiki/pygbag-configuration/README.md index 6c4e7cf..c6d6ab8 100644 --- a/wiki/pygbag-configuration/README.md +++ b/wiki/pygbag-configuration/README.md @@ -1,5 +1,16 @@ +# Pygbag Configuration (`pygbag.ini`) -TODO: pygbag.ini +The `pygbag.ini` file allows you to customize how Pygbag builds and packages your game. Its primary use is to define specific files and directories that should be excluded from your final web build (`.apk` or `.tar.gz`), keeping your game's download size as small as possible. +## File Format and Syntax -[Edit this page](https://github.com/pygame-web/pygame-web.github.io/edit/main/wiki/pygbag-configuration/README.md) +Pygbag parses this file using the `config-to-object` library. Because of this, the syntax for defining lists requires square brackets `[]` and quotes `""` around each item. + +### Example `pygbag.ini` + +Place this file in the root directory of your Pygbag project (right next to your `main.py`): + +```ini +[DEPENDENCIES] +ignoreDirs = [".git", "venv", "docs"] +ignoreFiles = ["build_pwa.py", "README.md", ".gitignore"]