(dirPath)
| 47 | const stripJson = (path) => writeFileSync(path, JSON.stringify(minJson(JSON.parse(readFileSync(path, 'utf8'))))); |
| 48 | |
| 49 | const tree = (dirPath) => readdirSync(dirPath).forEach((x) => { |
| 50 | const path = join(dirPath, x); |
| 51 | console.log(path); |
| 52 | |
| 53 | if (x.endsWith('.js')) return stripJs(path); |
| 54 | if (x.endsWith('.json')) return stripJson(path); |
| 55 | if (x.endsWith('.html')) return stripHtml(path); |
| 56 | if (!x.includes('.')) return tree(path); |
| 57 | }); |
| 58 | |
| 59 | tree(join(__dirname, '..', 'src')); |