File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed
Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ interface ICreateCommand {
3232
3333interface ICreator {
3434 location : string ;
35- module ?: ( options : { where : string } ) => void ;
35+ module ?: ( options : { where : string } ) => void | { repository : string } ;
3636 package ?: { } ;
3737}
3838
@@ -76,8 +76,8 @@ const pacman: IPacMan = {
7676 } ,
7777} ;
7878
79- export default async (
80- create : 'create' ,
79+ const create = async (
80+ subcommand : 'create' ,
8181 name : string ,
8282 where : string ,
8383 command : ICreateCommand ,
@@ -282,11 +282,29 @@ export default async (
282282
283283 log . write ( ` 👷 Running configuration` ) ;
284284
285- creator . module ! ( {
286- where,
287- } ) ;
285+ if ( typeof creator . module === 'function' ) {
286+ creator . module ( {
287+ where,
288+ } ) ;
289+ }
290+
291+ if ( typeof creator . module === 'object' ) {
292+ if ( ( creator . module as any ) . repository ) {
293+ await create (
294+ subcommand ,
295+ ( creator . module as any ) . repository ,
296+ where ,
297+ command ,
298+ ) ;
299+ }
300+ }
288301
289302 log . write ( `✔ 👷 Running configuration` ) ;
290303 log . clear ( ) ;
304+
305+ log . write ( `🎉 Done!` ) ;
306+ log . clear ( ) ;
291307 }
292308} ;
309+
310+ export default create ;
You can’t perform that action at this time.
0 commit comments