File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ module.exports = class Migrator {
2525 return classFilePaths ;
2626 }
2727
28+ findTemplates ( ) {
29+ const templateFolderPath = path . join ( this . projectRoot , 'app/templates' ) ;
30+ const templateFilePaths = glob . sync ( `${ templateFolderPath } /**/*.hbs` ) ;
31+
32+ return templateFilePaths ;
33+ }
34+
2835 skipTemplatesUsedAsLayoutName ( templateFilePaths ) {
2936 const classFilePaths = this . findClassicComponentClasses ( ) ;
3037 const componentsWithLayoutName = getLayoutNameTemplates ( classFilePaths ) ;
@@ -64,8 +71,7 @@ module.exports = class Migrator {
6471 templateFilePaths = this . skipTemplatesUsedAsLayoutName ( templateFilePaths ) ;
6572
6673
67- let sourceTemplatesPath = path . join ( this . projectRoot , 'app/templates' ) ;
68- var sourceTemplateFilePaths = glob . sync ( `${ sourceTemplatesPath } /**/*.hbs` ) ;
74+ let sourceTemplateFilePaths = this . findTemplates ( ) ;
6975 let templatesInPartials = getPartialTemplates ( sourceTemplateFilePaths ) ;
7076 if ( templatesInPartials . length ) {
7177 templateFilePaths = templateFilePaths . filter ( sourceTemplateFilePath => {
You can’t perform that action at this time.
0 commit comments