forked from entelecheia/hyperfast-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopier.yaml
132 lines (109 loc) · 3.7 KB
/
copier.yaml
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
_subdirectory: .copier-template
# Configure jinja2 defaults to make syntax highlighters lives easier
_templates_suffix: .jinja
_envops:
block_end_string: '%}'
block_start_string: '{%'
comment_end_string: '#}'
comment_start_string: '{#'
keep_trailing_newline: true
variable_end_string: '}}`'
variable_start_string: '`{{'
_answers_file: .copier-config.yaml
_tasks:
# Strings get executed under system's default shell
- '[ -d .git ] || git init'
- "{% if github_repo_name %}git add remote origin https://github.com/`{{ github_username }}`/`{{ github_repo_name }}`.git 2>/dev/null || echo 'origin already exists'{% else %}echo 'No GitHub repository name provided. Skipping git remote add.'{% endif %}"
# questions
project_name:
type: str
help: What is your project name? (it will be used in `pip install project_name`)
validator: >-
{% if not (project_name | regex_search('^[a-z][a-z0-9\-]+$')) %}
project_name must start with a letter, followed one or more letters, digits or dashes in lowercase only
{% endif %}
friendly_name:
default: '`{{ project_name }}`'
type: str
help: What is your project friendly name? (it will be used for the title of the documentation)
project_short_description:
type: str
help: What is your project short description?
project_description:
type: str
help: What is your project description?
project_license:
type: str
choices:
- MIT
- CC-BY-4.0
- Apache-2.0
- GPLv3
- None
author:
type: str
help: What is your name?
validator: >-
{% if not (author | regex_search('^[a-zA-Z][a-zA-Z ]+$')) %}
author must start with a letter, followed one or more letters or spaces
{% endif %}
github_username:
type: str
help: What is your GitHub username?
validator: >-
{% if not (github_username | regex_search('^[a-z0-9][a-z0-9\-]+$')) %}
github_username must start with a letter or digit, followed one or more letters, digits or dashes in lowercase only
{% endif %}
email:
default: '`{{ github_username }}`@'
type: str
help: What is your email?
validator: >-
{% if not (email | regex_search('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$')) %}
email must be a valid email address
{% endif %}
github_repo_name:
default: '`{{ project_name }}`'
type: str
help: What is your GitHub repository name?
build_and_release:
default: true
type: bool
help: Do you want to build and release the package?
upload_to_release:
default: true
type: bool
help: Do you want to upload the package to the GitHub release?
release_branch_name:
default: "release"
type: str
help: What is the name of the release branch? (e.g. main)
upload_to_repository:
default: true
type: bool
help: Do you want to upload the package to the NPM repository?
copyright_year:
default: "`{{ '%Y' | strftime }}`"
type: int
help: What is the copyright year?
documentation_url:
default: 'https://`{{ github_username }}`.github.io/`{{ github_repo_name }}`'
type: str
help: What is your documentation URL?
favicon_path:
type: str
help: What is the path to your favicon? (leave empty if you don't have one. e.g. favicon.png or https://example.com/favicon.png)
logo_path:
type: str
help: What is the path to your logo? (leave empty if you don't have one. e.g. logo.png or https://example.com/logo.png)
google_analytics_id:
type: str
help: What is your Google Analytics ID? (leave empty if you don't have one. e.g. G-XXXXXXXXXX)
use_source_code_skeleton:
default: true
type: bool
help: Do you want to use the source code skeleton? (it will create `src` and `tests` directories)
dist_path:
default: dist
type: str
help: What is your distribution path to publish? (the content of this folder will be published)