File tree Expand file tree Collapse file tree 3 files changed +13
-3
lines changed
Expand file tree Collapse file tree 3 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,7 @@ interface Printer {
457457 yellow ( str : string ) : this;
458458 green ( str : string ) : this;
459459 red ( str : string ) : this;
460+ blue ( str : string ) : this;
460461
461462 warning ( ...str : string [ ] ) : this;
462463 success ( ...str : string [ ] ) : this;
@@ -466,7 +467,7 @@ interface Printer {
466467export const printer : Printer
467468
468469export namespace helper {
469- module fs {
470+ namespace fs {
470471 /**
471472 * get extension of file without dot
472473 * @param filename
@@ -585,7 +586,7 @@ export namespace helper {
585586 function _read_json ( filepath : string ) : Promise < string > ;
586587 }
587588
588- module cmd {
589+ namespace cmd {
589590 /**
590591 * sleep by milliseconds
591592 * @param ms
@@ -694,7 +695,7 @@ export namespace helper {
694695 function _parallel ( functions : Function [ ] , options ?: { parallelCount ?: number , waitAll ?: boolean } ) : Promise < void >
695696 }
696697
697- module is {
698+ namespace is {
698699 function undefined ( a : any ) : boolean
699700 function array ( a : any ) : boolean
700701 function string ( a : any ) : boolean
Original file line number Diff line number Diff line change @@ -137,8 +137,14 @@ function red(str) {
137137 return this ;
138138}
139139
140+ function blue ( str ) {
141+ print ( str . blue ) ;
142+ return this ;
143+ }
144+
140145module . exports = {
141146 colors,
147+
142148 fixed,
143149 print,
144150 themes,
@@ -153,7 +159,9 @@ module.exports = {
153159 warning,
154160 success,
155161 error,
162+
156163 yellow,
157164 green,
165+ blue,
158166 red
159167} ;
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ describe('print test case', function () {
1717 printer . yellow ( 'yellow' ) . green ( 'yellow' ) ;
1818 printer . green ( 'green' ) . red ( 'red' ) ;
1919 printer . red ( 'red' ) . yellow ( 'yellow' ) ;
20+ printer . blue ( 'blue' ) . green ( 'green' ) ;
2021 printer . fixed ( 'fixed str' , 20 , 'center' ) . println ( 'eol' ) ;
2122 printer . fixed ( 'fixed' ) . println ( 'eol' ) ;
2223 // exec here is ok
You can’t perform that action at this time.
0 commit comments