You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/how-to/contribute/how/write_code.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,35 @@ To begin working on code, ensure you have a [development environment](dev_enviro
10
10
11
11
{% block testing_additional %}
12
12
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.
14
15
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>
0 commit comments