@@ -92,22 +92,26 @@ const checkBoolean = value => value && value !== 'false' ? true : false;
9292
9393export const initPlugin = async ( opts = { } ) => {
9494 printRow ( 'Start project creation...' ) ;
95+ opts . components = checkBoolean ( opts . components ) ;
96+ opts . blocks = checkBoolean ( opts . blocks ) ;
97+ opts . i18n = checkBoolean ( opts . i18n ) ;
98+
9599 const tasks = new Listr ( [
96100 {
97101 title : 'Creating initial source files' ,
98102 task : ( ) => createSourceFiles ( opts ) ,
99103 } , {
100104 title : 'Creating custom Component Type file' ,
101105 task : ( ) => createFileComponents ( opts ) ,
102- enabled : ( ) => checkBoolean ( opts . components ) ,
106+ enabled : ( ) => opts . components ,
103107 } , {
104108 title : 'Creating Blocks file' ,
105109 task : ( ) => createFileBlocks ( opts ) ,
106- enabled : ( ) => checkBoolean ( opts . blocks ) ,
110+ enabled : ( ) => opts . blocks ,
107111 } , {
108112 title : 'Creating i18n structure' ,
109113 task : ( ) => createI18n ( opts ) ,
110- enabled : ( ) => checkBoolean ( opts . i18n ) ,
114+ enabled : ( ) => opts . i18n ,
111115 } , {
112116 title : 'Update package.json' ,
113117 task : ( ) => createPackage ( opts ) ,
0 commit comments