File tree Expand file tree Collapse file tree 2 files changed +26
-22
lines changed Expand file tree Collapse file tree 2 files changed +26
-22
lines changed Original file line number Diff line number Diff line change @@ -10164,6 +10164,18 @@ let rec process_theme_aux env cwd (x : OCamlRes.Res.node) =
10164
10164
Unix. mkdir (cwd// current) 0o777 ;
10165
10165
List. iter (fun x -> process_theme_aux env (cwd// current) x ) nodes
10166
10166
10167
+ let list_themes () =
10168
+ Format. fprintf Format. std_formatter " Available themes: @." ;
10169
+ Bsb_templates. root
10170
+ |>
10171
+ List. iter (fun (x : OCamlRes.Res.node ) ->
10172
+ match x with
10173
+ | Dir (x , _ ) ->
10174
+ Format. fprintf Format. std_formatter " %s@." x
10175
+
10176
+ | _ -> ()
10177
+ )
10178
+
10167
10179
(* @raise [Not_found] *)
10168
10180
let process_themes name theme proj_dir (themes : OCamlRes.Res.node list ) =
10169
10181
let env = String_hashtbl. create 0 in
@@ -10179,6 +10191,7 @@ let process_themes name theme proj_dir (themes : OCamlRes.Res.node list ) =
10179
10191
| File _ -> false
10180
10192
) themes with
10181
10193
| exception Not_found ->
10194
+ list_themes () ;
10182
10195
raise (Arg. Bad ( " theme " ^ name ^ " not found" ) )
10183
10196
| Dir (_theme , nodes ) ->
10184
10197
List. iter (fun node -> process_theme_aux env proj_dir node ) nodes
@@ -10211,17 +10224,6 @@ let init_sample_project ~cwd ~theme name =
10211
10224
end
10212
10225
10213
10226
10214
- let list_themes () =
10215
- Format. fprintf Format. std_formatter " Available themes: @." ;
10216
- Bsb_templates. root
10217
- |>
10218
- List. iter (fun (x : OCamlRes.Res.node ) ->
10219
- match x with
10220
- | Dir (x , _ ) ->
10221
- Format. fprintf Format. std_formatter " %s@." x
10222
-
10223
- | _ -> ()
10224
- )
10225
10227
10226
10228
end
10227
10229
module Bsb_unix : sig
Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ let rec process_theme_aux env cwd (x : OCamlRes.Res.node) =
59
59
Unix. mkdir (cwd// current) 0o777 ;
60
60
List. iter (fun x -> process_theme_aux env (cwd// current) x ) nodes
61
61
62
+ let list_themes () =
63
+ Format. fprintf Format. std_formatter " Available themes: @." ;
64
+ Bsb_templates. root
65
+ |>
66
+ List. iter (fun (x : OCamlRes.Res.node ) ->
67
+ match x with
68
+ | Dir (x , _ ) ->
69
+ Format. fprintf Format. std_formatter " %s@." x
70
+
71
+ | _ -> ()
72
+ )
73
+
62
74
(* @raise [Not_found] *)
63
75
let process_themes name theme proj_dir (themes : OCamlRes.Res.node list ) =
64
76
let env = String_hashtbl. create 0 in
@@ -74,6 +86,7 @@ let process_themes name theme proj_dir (themes : OCamlRes.Res.node list ) =
74
86
| File _ -> false
75
87
) themes with
76
88
| exception Not_found ->
89
+ list_themes () ;
77
90
raise (Arg. Bad ( " theme " ^ name ^ " not found" ) )
78
91
| Dir (_theme , nodes ) ->
79
92
List. iter (fun node -> process_theme_aux env proj_dir node ) nodes
@@ -106,14 +119,3 @@ let init_sample_project ~cwd ~theme name =
106
119
end
107
120
108
121
109
- let list_themes () =
110
- Format. fprintf Format. std_formatter " Available themes: @." ;
111
- Bsb_templates. root
112
- |>
113
- List. iter (fun (x : OCamlRes.Res.node ) ->
114
- match x with
115
- | Dir (x , _ ) ->
116
- Format. fprintf Format. std_formatter " %s@." x
117
-
118
- | _ -> ()
119
- )
You can’t perform that action at this time.
0 commit comments