UNPKG

294 BJavaScriptView Raw
1import path from "path";
2import fs from 'fs';
3
4export default function getHacks() {
5 const inputDir = "./src/";
6 const srcFiles = fs.readdirSync(inputDir);
7 const hacks = srcFiles
8 .filter(file => file.match(/^.*?(?<!\.test)\.js$/))
9 .map(file => path.join(inputDir, file));
10 return hacks;
11}