Skip to content

Commit

Permalink
feat(#181): globs
Browse files Browse the repository at this point in the history
  • Loading branch information
jannis-baum committed Sep 5, 2024
1 parent 1c01961 commit bd0020c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs';
import { globSync } from 'glob';
import { homedir } from 'os';
import path from 'path';

Expand Down Expand Up @@ -59,7 +60,9 @@ const getFileContents = (
if (resolved[0] !== '/' && baseDir !== undefined) {
resolved = path.join(baseDir, resolved);
}
return fs.existsSync(resolved) ? fs.readFileSync(resolved, 'utf8') : '';
return globSync(resolved)
.map((p) => fs.readFileSync(p, 'utf8'))
.join('\n');
};

if (Array.isArray(paths)) {
Expand Down

0 comments on commit bd0020c

Please sign in to comment.