1
1
use crate :: util:: assets;
2
- use dfx_core:: config:: project_templates:: {
3
- Category , ProjectTemplate , ProjectTemplateName , ResourceLocation ,
4
- } ;
2
+ use dfx_core:: config:: model:: project_template:: ProjectTemplateCategory ;
3
+ use dfx_core:: config:: project_templates:: { ProjectTemplate , ProjectTemplateName , ResourceLocation } ;
5
4
6
5
const NPM_INSTALL : & str = "npm install --quiet --no-progress --workspaces --if-present" ;
7
6
const NPM_INSTALL_SPINNER_MESSAGE : & str = "Installing node dependencies..." ;
@@ -16,7 +15,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
16
15
resource_location : ResourceLocation :: Bundled {
17
16
get_archive_fn : assets:: new_project_motoko_files,
18
17
} ,
19
- category : Category :: Backend ,
18
+ category : ProjectTemplateCategory :: Backend ,
20
19
post_create : vec ! [ ] ,
21
20
post_create_failure_warning : None ,
22
21
post_create_spinner_message : None ,
@@ -30,7 +29,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
30
29
resource_location : ResourceLocation :: Bundled {
31
30
get_archive_fn : assets:: new_project_rust_files,
32
31
} ,
33
- category : Category :: Backend ,
32
+ category : ProjectTemplateCategory :: Backend ,
34
33
post_create : vec ! [ "cargo update" . to_string( ) ] ,
35
34
post_create_failure_warning : Some ( CARGO_UPDATE_FAILURE_MESSAGE . to_string ( ) ) ,
36
35
post_create_spinner_message : None ,
@@ -44,7 +43,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
44
43
resource_location : ResourceLocation :: Bundled {
45
44
get_archive_fn : assets:: new_project_azle_files,
46
45
} ,
47
- category : Category :: Backend ,
46
+ category : ProjectTemplateCategory :: Backend ,
48
47
post_create : vec ! [ ] ,
49
48
post_create_failure_warning : None ,
50
49
post_create_spinner_message : None ,
@@ -58,7 +57,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
58
57
resource_location : ResourceLocation :: Bundled {
59
58
get_archive_fn : assets:: new_project_kybra_files,
60
59
} ,
61
- category : Category :: Backend ,
60
+ category : ProjectTemplateCategory :: Backend ,
62
61
post_create : vec ! [ ] ,
63
62
post_create_failure_warning : None ,
64
63
post_create_spinner_message : None ,
@@ -72,7 +71,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
72
71
resource_location : ResourceLocation :: Bundled {
73
72
get_archive_fn : assets:: new_project_svelte_files,
74
73
} ,
75
- category : Category :: Frontend ,
74
+ category : ProjectTemplateCategory :: Frontend ,
76
75
post_create : vec ! [ NPM_INSTALL . to_string( ) ] ,
77
76
post_create_failure_warning : Some ( NPM_INSTALL_FAILURE_WARNING . to_string ( ) ) ,
78
77
post_create_spinner_message : Some ( NPM_INSTALL_SPINNER_MESSAGE . to_string ( ) ) ,
@@ -86,7 +85,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
86
85
resource_location : ResourceLocation :: Bundled {
87
86
get_archive_fn : assets:: new_project_react_files,
88
87
} ,
89
- category : Category :: Frontend ,
88
+ category : ProjectTemplateCategory :: Frontend ,
90
89
post_create : vec ! [ NPM_INSTALL . to_string( ) ] ,
91
90
post_create_failure_warning : Some ( NPM_INSTALL_FAILURE_WARNING . to_string ( ) ) ,
92
91
post_create_spinner_message : Some ( NPM_INSTALL_SPINNER_MESSAGE . to_string ( ) ) ,
@@ -100,7 +99,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
100
99
resource_location : ResourceLocation :: Bundled {
101
100
get_archive_fn : assets:: new_project_vue_files,
102
101
} ,
103
- category : Category :: Frontend ,
102
+ category : ProjectTemplateCategory :: Frontend ,
104
103
post_create : vec ! [ NPM_INSTALL . to_string( ) ] ,
105
104
post_create_failure_warning : Some ( NPM_INSTALL_FAILURE_WARNING . to_string ( ) ) ,
106
105
post_create_spinner_message : Some ( NPM_INSTALL_SPINNER_MESSAGE . to_string ( ) ) ,
@@ -114,7 +113,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
114
113
resource_location : ResourceLocation :: Bundled {
115
114
get_archive_fn : assets:: new_project_vanillajs_files,
116
115
} ,
117
- category : Category :: Frontend ,
116
+ category : ProjectTemplateCategory :: Frontend ,
118
117
post_create : vec ! [ NPM_INSTALL . to_string( ) ] ,
119
118
post_create_failure_warning : Some ( NPM_INSTALL_FAILURE_WARNING . to_string ( ) ) ,
120
119
post_create_spinner_message : Some ( NPM_INSTALL_SPINNER_MESSAGE . to_string ( ) ) ,
@@ -128,7 +127,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
128
127
resource_location : ResourceLocation :: Bundled {
129
128
get_archive_fn : assets:: new_project_assets_files,
130
129
} ,
131
- category : Category :: Frontend ,
130
+ category : ProjectTemplateCategory :: Frontend ,
132
131
post_create : vec ! [ ] ,
133
132
post_create_failure_warning : None ,
134
133
post_create_spinner_message : None ,
@@ -142,7 +141,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
142
141
resource_location : ResourceLocation :: Bundled {
143
142
get_archive_fn : assets:: new_project_svelte_test_files,
144
143
} ,
145
- category : Category :: FrontendTest ,
144
+ category : ProjectTemplateCategory :: FrontendTest ,
146
145
post_create : vec ! [ ] ,
147
146
post_create_failure_warning : None ,
148
147
post_create_spinner_message : None ,
@@ -156,7 +155,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
156
155
resource_location : ResourceLocation :: Bundled {
157
156
get_archive_fn : assets:: new_project_react_test_files,
158
157
} ,
159
- category : Category :: FrontendTest ,
158
+ category : ProjectTemplateCategory :: FrontendTest ,
160
159
post_create : vec ! [ ] ,
161
160
post_create_failure_warning : None ,
162
161
post_create_spinner_message : None ,
@@ -170,7 +169,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
170
169
resource_location : ResourceLocation :: Bundled {
171
170
get_archive_fn : assets:: new_project_vue_test_files,
172
171
} ,
173
- category : Category :: FrontendTest ,
172
+ category : ProjectTemplateCategory :: FrontendTest ,
174
173
post_create : vec ! [ ] ,
175
174
post_create_failure_warning : None ,
176
175
post_create_spinner_message : None ,
@@ -184,7 +183,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
184
183
resource_location : ResourceLocation :: Bundled {
185
184
get_archive_fn : assets:: new_project_vanillajs_test_files,
186
185
} ,
187
- category : Category :: FrontendTest ,
186
+ category : ProjectTemplateCategory :: FrontendTest ,
188
187
post_create : vec ! [ ] ,
189
188
post_create_failure_warning : None ,
190
189
post_create_spinner_message : None ,
@@ -198,7 +197,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
198
197
resource_location : ResourceLocation :: Bundled {
199
198
get_archive_fn : assets:: new_project_internet_identity_files,
200
199
} ,
201
- category : Category :: Extra ,
200
+ category : ProjectTemplateCategory :: Extra ,
202
201
post_create : vec ! [ ] ,
203
202
post_create_failure_warning : None ,
204
203
post_create_spinner_message : None ,
@@ -212,7 +211,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
212
211
resource_location : ResourceLocation :: Bundled {
213
212
get_archive_fn : assets:: new_project_bitcoin_files,
214
213
} ,
215
- category : Category :: Extra ,
214
+ category : ProjectTemplateCategory :: Extra ,
216
215
post_create : vec ! [ ] ,
217
216
post_create_failure_warning : None ,
218
217
post_create_spinner_message : None ,
@@ -226,7 +225,7 @@ pub fn builtin_templates() -> Vec<ProjectTemplate> {
226
225
resource_location : ResourceLocation :: Bundled {
227
226
get_archive_fn : assets:: new_project_js_files,
228
227
} ,
229
- category : Category :: Support ,
228
+ category : ProjectTemplateCategory :: Support ,
230
229
post_create : vec ! [ ] ,
231
230
post_create_failure_warning : None ,
232
231
post_create_spinner_message : None ,
0 commit comments