Skip to content

Commit

Permalink
fix: parse "ts" and "tsx" files too
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Jan 16, 2020
1 parent 8aaf098 commit d1f271b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/extractSrcDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ const isIgnoredPath = ({ path, instance, adioRc }) => {
};

module.exports = ({ dir, instance, adioRc }) => {
const paths = glob.sync(dir + "/**/*.js");
const fileExtensions = ['js', 'ts', 'tsx'];
const paths = [];
for (let i = 0; i < fileExtensions.length; i++) {
let fileExtension = fileExtensions[i];
paths.push(...glob.sync(dir + `/**/*.${fileExtension}`));
}

const deps = [];
paths.forEach(path => {
if (isIgnoredPath({ path, instance, adioRc })) {
Expand Down

0 comments on commit d1f271b

Please sign in to comment.