Skip to content

Commit 48d02d1

Browse files
committed
Fixed a bug. Partial templates should be kept in app/templates when codemod is run twice (idempotency).
1 parent 8122780 commit 48d02d1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/migrator.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ module.exports = class Migrator {
2727
}
2828

2929
findTemplates() {
30-
const templateFolderPath = path.join(this.projectRoot, 'app/templates');
31-
const templateFilePaths = glob.sync(`${templateFolderPath}/**/*.hbs`);
30+
const componentsFolderPath = path.join(this.projectRoot, 'app/components');
31+
const templatesFolderPath = path.join(this.projectRoot, 'app/templates');
32+
const templateFilePaths = glob.sync(`{${componentsFolderPath},${templatesFolderPath}}/**/*.hbs`);
3233

3334
return templateFilePaths;
3435
}

0 commit comments

Comments
 (0)