Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Support .ts file extensions for loadModules
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Erickson committed Aug 21, 2019
1 parent c2182c9 commit 8f3710a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/botkit/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,8 @@ export class Botkit {
* @param p {string} path to a folder of module files
*/
public loadModules(p: string): void {
// load all the .js files from this path
fs.readdirSync(p).filter((f) => { return (path.extname(f) === '.js'); }).forEach((file) => {
// load all the .js|.ts files from this path
fs.readdirSync(p).filter((f) => { return (path.extname(f) === '.js' || path.extname(f) === '.ts'); }).forEach((file) => {
this.loadModule(path.join(p, file));
});
}
Expand Down

0 comments on commit 8f3710a

Please sign in to comment.