Skip to content

Commit bdf0d54

Browse files
author
hirsch88
committed
fix typescript and javascript file glob
1 parent 3ed6d2b commit bdf0d54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/core/IoC.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ class IoC {
188188
}
189189

190190
private getFiles(path: string, done: (files: any[]) => void): void {
191+
const isTypeScript = __dirname.indexOf('/src/') >= 0;
192+
if (!isTypeScript) {
193+
path = path.replace('.ts', '.js');
194+
}
191195
glob(this.getBasePath() + path, (err: any, files: string[]) => {
192196
if (err) {
193197
log.warn(`Could not read the folder ${path}!`);

0 commit comments

Comments
 (0)