Skip to content

Commit 1966c1e

Browse files
committed
Docs: document Briefcase template overview and wizard template testing
1 parent 0ca8371 commit 1966c1e

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

docs/en/how-to/contribute/how/write_code.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,35 @@ To begin working on code, ensure you have a [development environment](dev_enviro
1010

1111
{% block testing_additional %}
1212

13-
### Briefcase-specific content
13+
### Templates used by Briefcase at runtime
14+
Briefcase uses templates at runtime to generate the files and project structure for applications. When a contributor runs commands such as `briefcase new`, `briefcase create`, or `briefcase build`, Briefcase selects and renders one or more templates to produce platform-specific project scaffolding.
1415

15-
This is some additional Briefcase testing content
16+
These templates are maintained separately from Briefcase’s core code, which allows template development and testing to evolve independently of Briefcase releases.
17+
18+
Broadly, Briefcase works with two categories of templates:
19+
20+
* **Wizard templates**
21+
These templates are used during `briefcase new` to generate the initial project layout, including files such as `pyproject.toml`, application metadata, and basic source structure.
22+
23+
* **Platform-specific templates**
24+
These templates are used during `briefcase create` and later stages to generate platform-dependent project files (for example, macOS, Windows, Linux, Android, or iOS). Each platform has its own template repository that defines how the application is structured and built on that platform.
25+
26+
When contributing changes to templates, it is often necessary to test those changes locally before they are merged. The following sections describe how to configure Briefcase to use modified template repositories and branches for testing purposes.
27+
28+
### Testing wizard template changes
29+
30+
Wizard templates are used when creating a new project with `briefcase new`. If you are making changes to a wizard template, it is usually necessary to test those changes locally before submitting them for review.
31+
32+
Briefcase allows contributors to specify a custom wizard template repository and branch when creating a new project. This makes it possible to test template changes without modifying Briefcase’s core code.
33+
34+
To test a modified wizard template:
35+
36+
1. Fork and clone the wizard template repository you are working on.
37+
2. Make your changes in a local branch.
38+
3. Run `briefcase new`, specifying the custom template repository and branch:
39+
40+
```bash
41+
briefcase new --template <template-repository-url> --template-branch <branch-name>
1642

1743
{% endblock %}
1844

0 commit comments

Comments
 (0)