@@ -9,7 +9,7 @@ export class EntityToApplication extends Command {
99 static aliases = [ 'entity-to-application' , 'entity-to-app' , 'entity2app' ] ;
1010 static description = 'Linking the entity to the application, based on the Rucken template' ;
1111 static flags = {
12- type : flags . string ( { char : 't' , description : 'Type(s) of applications.' , multiple : true , options : [ 'web' , 'ionic' ] } ) ,
12+ type : flags . string ( { char : 't' , description : 'Type(s) of applications.' , multiple : true , options : [ 'web' , 'ionic' , 'all' ] } ) ,
1313 coreLib : flags . string ( { description : 'The name of the core library with entity.' } ) ,
1414 webLib : flags . string ( { description : 'The name of the web library with entity.' } ) ,
1515 ionicLib : flags . string ( { description : 'The name of the ionic library with entity.' } ) ,
@@ -52,7 +52,7 @@ export class EntityToApplication extends Command {
5252 name : 'type' ,
5353 message : 'What type(s) of entity would you like to link for the application(s)?' ,
5454 type : 'checkbox' ,
55- choices : [ 'web' , 'ionic' ] ,
55+ choices : [ 'web' , 'ionic' , 'all' ] ,
5656 validate : ( value : string ) => value . length > 0
5757 } ] : [ ]
5858 )
@@ -75,16 +75,16 @@ export class EntityToApplication extends Command {
7575 const webTemplate = flags . webTemplate ;
7676 const ionicTemplate = flags . ionicTemplate ;
7777 // core
78- if ( type . indexOf ( 'web' ) !== - 1 || type . indexOf ( 'ionic' ) !== - 1 ) {
78+ if ( type . indexOf ( 'web' ) !== - 1 || type . indexOf ( 'ionic' ) !== - 1 || type . indexOf ( 'all' ) !== - 1 ) {
7979 ( { coreLib, result, coreLibOrg } = await this . prepareCore ( name , coreLib , angularJson , nxJson , result , coreLibOrg ) ) ;
8080 }
8181 // web
82- if ( type . indexOf ( 'web' ) !== - 1 ) {
82+ if ( type . indexOf ( 'web' ) !== - 1 || type . indexOf ( 'all' ) !== - 1 ) {
8383 ( { webLib, webApp, result, webLibOrg } = await this . prepareWeb ( name , webLib , webApp , angularJson , nxJson , result , webLibOrg , webTemplate , coreLib , coreLibOrg , workspace ) ) ;
8484 ( { webLib, webApp, result, webLibOrg } = await this . prepareWebApp ( name , webLib , webApp , angularJson , nxJson , result , webLibOrg , webTemplate , coreLib , coreLibOrg , workspace ) ) ;
8585 }
8686 // ionic
87- if ( type . indexOf ( 'ionic' ) !== - 1 ) {
87+ if ( type . indexOf ( 'ionic' ) !== - 1 || type . indexOf ( 'all' ) !== - 1 ) {
8888 ( { ionicLib, ionicApp, result, ionicLibOrg } = await this . prepareIonic ( name , ionicLib , ionicApp , angularJson , nxJson , result , ionicLibOrg , ionicTemplate , coreLib , coreLibOrg , workspace ) ) ;
8989 ( { ionicLib, ionicApp, result, ionicLibOrg } = await this . prepareIonicApp ( name , ionicLib , ionicApp , angularJson , nxJson , result , ionicLibOrg , ionicTemplate , coreLib , coreLibOrg , workspace ) ) ;
9090 }
0 commit comments