-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcopier.yml
More file actions
196 lines (160 loc) · 4.78 KB
/
copier.yml
File metadata and controls
196 lines (160 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# questions
# mod name and id
modid:
type: str
help: Mod ID (eg. minecraft, hexcasting)
validator: |
{%- import "macros/validators.jinja" as validators -%}
{{- validators.not_empty(modid) -}}
{{- validators.regex(modid, "^[a-z][a-z0-9_]{1,63}$") -}}
mod_display_name:
type: str
help: Mod display name
default: "{{ modid|capitalize|replace('_', ' ') }}"
mod_description:
type: str
help: Mod description
default: "{{ mod_display_name }} addon for Hex Casting."
github_user:
type: str
help: GitHub username
validator: |
{%- import "macros/validators.jinja" as validators -%}
{{- validators.not_empty(github_user) -}}
github_repo:
type: str
help: GitHub repository name
default: "{{ modid }}"
main_branch:
type: str
help: Primary branch name (eg. main, master)
default: main
minecraft_version:
type: str
help: Minecraft version
choices:
- "1.19.2"
- "1.20.1"
default: "1.20.1"
patchouli_book_id:
when: "{{ minecraft_version == '1.19.2' }}"
type: str
help: Patchouli book ID
default: hexcasting:thehexbook
# mod structure
gradle_mod_version_key:
type: str
help: Key in gradle.properties that contains your mod's version number
default: modVersion
minecraft_version_in_mod_version:
type: bool
help: Is the Minecraft version included in your mod version? (eg. v{{ mod_version }}+1.20.1)
default: false
gradle_minecraft_version_key:
when: "{{ minecraft_version_in_mod_version }}"
type: str
help: Key in gradle.properties that contains the Minecraft version for your mod
default: minecraftVersion
gradle_deps_type:
type: str
help: Where are your Gradle dependencies stored?
choices:
- gradle.properties
- gradle/libs.versions.toml
version_catalog:
when: false
type: bool
default: "{{ gradle_deps_type == 'gradle/libs.versions.toml' }}"
gradle_hex_version_key:
type: str
help: "{{ 'Version name in gradle/libs.versions.toml' if version_catalog else 'Key in gradle.properties' }} that contains the Hex Casting version for your mod"
default: "{{ 'hexcasting' if version_catalog else 'hexcastingVersion' }}"
multiloader:
type: bool
help: Does your mod support multiple platforms?
default: true
capitalize_platforms:
when: "{{ multiloader }}"
type: bool
help: Are your platform directory names capitalized? (eg. Common vs common)
default: false
common_path:
when: false
default: "{{ 'Common' if capitalize_platforms else 'common' }}"
fabric_path:
when: false
default: "{{ 'Fabric' if capitalize_platforms else 'fabric' }}"
forge_path:
when: false
default: "{{ 'Forge' if capitalize_platforms else 'forge' }}"
pattern_registry_path:
type: str
help: Path to the file where your patterns are registered (relative to {{ common_path~'/' if multiloader }}src/)
default: main/java/io/github/{{ github_user|lower }}/{{ modid }}/registry/{{ classname }}Patterns.java
# advanced
advanced:
type: bool
help: Show advanced options?
default: false
classname:
when: "{{ advanced }}"
type: str
help: "Classname base (eg. '{{ modid|capitalize }}' -> '{{ modid|capitalize }}Client.java')"
default: "{{ modid|replace('_', '')|capitalize }}"
validator: |
{%- import "macros/validators.jinja" as validators -%}
{{- validators.not_empty(classname) -}}
{{- validators.java_identifier(classname) -}}
package_name:
when: "{{ advanced }}"
type: str
default: "hexdoc-{{ modid|replace('_', '-')|lower }}"
package_slug:
when: "{{ advanced }}"
type: str
default: "hexdoc_{{ modid|lower }}"
source_url:
when: "{{ advanced }}"
type: str
default: "https://github.com/{{ github_user }}/{{ github_repo }}"
pages_url:
when: "{{ advanced }}"
type: str
default: "https://{{ github_user|lower }}.github.io/{{ github_repo }}"
generate_vscode:
when: "{{ advanced }}"
type: bool
help: Generate files in .vscode/?
default: true
# Copier settings (not prompted)
_subdirectory: template
_answers_file: .copier-answers.hexdoc-hexcasting.yml
_skip_if_exists:
- ".env"
- "icon.png"
_exclude:
# for copier-template-tester
- ".ctt"
- "ctt.toml"
# Defaults: https://copier.readthedocs.io/en/latest/configuring/#exclude
- "copier.yaml"
- "copier.yml"
- "~*"
- "*.py[co]"
- "__pycache__"
- ".git"
- ".DS_Store"
- ".svn"
_envops:
keep_trailing_newline: true
trim_blocks: true
lstrip_blocks: true
_message_after_copy: |-
Next steps:
- Check your .gitignore{{ ' and .vscode/' if generate_vscode }} for merge conflicts.
- Make sure the file paths, pattern regex, and other configs in pyproject.toml and doc/hexdoc.toml match your actual project structure.
- Set up your Python environment and lockfile:
uv sync
- Try out your new hexdoc book:
uv run hexdoc serve
- Set up GitHub Pages: https://hexdoc.hexxy.media/docs/guides/deployment/github-pages