File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -101,23 +101,24 @@ module.exports = class Migrator {
101101 } ) ;
102102 }
103103
104- async removeEmptyClassicComponentDirectories ( removeOnlyEmptyDirectories ) {
104+ async removeEmptyClassicComponentDirectories ( ) {
105105 const templateFolderPath = path . join ( this . projectRoot , 'app/templates/components' ) ;
106+
107+ const classFilePaths = this . findClassicComponentClasses ( ) ;
108+ const templatesWithLayoutName = getLayoutNameTemplates ( classFilePaths ) ;
109+ const removeOnlyEmptyDirectories = Boolean ( templatesWithLayoutName . length ) ;
106110
107111 await removeDirs ( templateFolderPath , removeOnlyEmptyDirectories ) ;
108112 }
109113
110114 async execute ( ) {
111115 let templateFilePaths = this . findClassicComponentTemplates ( ) ;
112- let classFilePaths = this . findClassicComponentClasses ( ) ;
113-
114116 templateFilePaths = this . skipTemplatesUsedAsLayoutName ( templateFilePaths ) ;
115117 templateFilePaths = this . skipTemplatesUsedAsPartial ( templateFilePaths ) ;
116118
117119 this . changeComponentStructureToFlat ( templateFilePaths ) ;
118120
119- const templatesWithLayoutName = getLayoutNameTemplates ( classFilePaths ) ;
120- const removeOnlyEmptyDirectories = Boolean ( templatesWithLayoutName . length ) ;
121- await this . removeEmptyClassicComponentDirectories ( removeOnlyEmptyDirectories ) ;
121+ // Clean up
122+ await this . removeEmptyClassicComponentDirectories ( ) ;
122123 }
123124}
You can’t perform that action at this time.
0 commit comments