@@ -8,99 +8,126 @@ export class Apps extends Base {
88 constructor ( public folders : string [ ] , public rootFolder : string ) {
99 super ( '' , rootFolder ) ;
1010 }
11- async clear ( customOptions : { package : any , packages ?: any [ ] , folder : string } ) {
11+ async clear ( customOptions ? : { package ? : any , packages ?: any [ ] , folder ? : string } ) {
1212 const results = [ ] ;
1313 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
1414 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
1515 app . debug = this . debug ;
16+ if ( ! customOptions ) {
17+ customOptions = { } ;
18+ }
1619 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
1720 results . push ( await app . clear ( customOptions ) ) ;
1821 }
1922 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
2023 }
21- async build ( customOptions : { package : any , packages ?: any [ ] , folder : string , srcFolder : string } ) {
24+ async build ( customOptions ? : { package ? : any , packages ?: any [ ] , folder ? : string , srcFolder ? : string } ) {
2225 const results = [ ] ;
2326 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
2427 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
2528 app . debug = this . debug ;
29+ if ( ! customOptions ) {
30+ customOptions = { } ;
31+ }
2632 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
2733 results . push ( await app . build ( customOptions ) ) ;
2834 }
2935 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
3036 }
31- async link ( customOptions : { package : any , packages ?: any [ ] , folder : string , srcFolder : string } ) {
37+ async link ( customOptions ? : { package ? : any , packages ?: any [ ] , folder ? : string , srcFolder ? : string } ) {
3238 const results = [ ] ;
3339 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
3440 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
3541 app . debug = this . debug ;
42+ if ( ! customOptions ) {
43+ customOptions = { } ;
44+ }
3645 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
3746 results . push ( await app . link ( customOptions ) ) ;
3847 }
3948 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
4049 }
41- async linkNpm ( customOptions : { package : any , packages ?: any [ ] , folder : string , srcFolder : string } ) {
50+ async linkNpm ( customOptions ? : { package ? : any , packages ?: any [ ] , folder ? : string , srcFolder ? : string } ) {
4251 const results = [ ] ;
4352 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
4453 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
4554 app . debug = this . debug ;
55+ if ( ! customOptions ) {
56+ customOptions = { } ;
57+ }
4658 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
4759 results . push ( await app . linkNpm ( customOptions ) ) ;
4860 }
4961 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
5062 }
51- async changeVersion ( customOptions : { package : any , packages ?: any [ ] , rootPackagePath : string , srcPackagePath : string } ) {
63+ async changeVersion ( customOptions ? : { package ? : any , packages ?: any [ ] , rootPackagePath ? : string , srcPackagePath ? : string } ) {
5264 const results = [ ] ;
5365 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
5466 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
5567 app . debug = this . debug ;
68+ if ( ! customOptions ) {
69+ customOptions = { } ;
70+ }
5671 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
5772 results . push ( await app . changeVersion ( customOptions ) ) ;
5873 }
5974 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
6075 }
61- async extractTranslate ( customOptions : { package : any , packages ?: any [ ] , srcFolder : string } ) {
76+ async extractTranslate ( customOptions ? : { package ? : any , packages ?: any [ ] , srcFolder ? : string } ) {
6277 const results = [ ] ;
6378 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
6479 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
6580 app . debug = this . debug ;
81+ if ( ! customOptions ) {
82+ customOptions = { } ;
83+ }
6684 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
6785 results . push ( await app . extractTranslate ( customOptions ) ) ;
6886 }
6987 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
7088 }
71- async po2ts ( customOptions : { package : any , packages ?: any [ ] , i18nFolder : string } ) {
89+ async po2ts ( customOptions ? : { package ? : any , packages ?: any [ ] , i18nFolder ? : string } ) {
7290 const results = [ ] ;
7391 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
7492 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
7593 app . debug = this . debug ;
94+ if ( ! customOptions ) {
95+ customOptions = { } ;
96+ }
7697 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
7798 results . push ( await app . po2ts ( customOptions ) ) ;
7899 }
79100 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
80101 }
81- async prepare ( customOptions : {
82- package : any ,
102+ async prepare ( customOptions ? : {
103+ package ? : any ,
83104 packages ?: any [ ] ,
84- i18nFolder : string ,
85- srcFolder : string ,
86- listComponentsPostfix : string
87- rootPackagePath : string ,
88- srcPackagePath : string
105+ i18nFolder ? : string ,
106+ srcFolder ? : string ,
107+ listComponentsPostfix ? : string
108+ rootPackagePath ? : string ,
109+ srcPackagePath ? : string
89110 } ) {
90111 const results = [ ] ;
91112 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
92113 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
93114 app . debug = this . debug ;
115+ if ( ! customOptions ) {
116+ customOptions = { } ;
117+ }
94118 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
95119 results . push ( await app . prepare ( customOptions ) ) ;
96120 }
97121 return results . reduce ( ( all : boolean , current : boolean ) => { return all && current ; } , true ) ;
98122 }
99- async makeTsList ( customOptions : { package : any , packages ?: any [ ] , listComponentsPostfix : string , srcFolder : string } ) {
123+ async makeTsList ( customOptions ? : { package ? : any , packages ?: any [ ] , listComponentsPostfix ? : string , srcFolder ? : string } ) {
100124 const results = [ ] ;
101125 for ( let i = 0 ; i < this . folders . length ; i ++ ) {
102126 const app = new App ( this . folders [ i ] , this . rootFolder ) ;
103127 app . debug = this . debug ;
128+ if ( ! customOptions ) {
129+ customOptions = { } ;
130+ }
104131 customOptions . package = customOptions . packages ? customOptions . packages [ i ] : null ;
105132 results . push ( await app . makeTsList ( customOptions ) ) ;
106133 }
0 commit comments