Skip to content

Commit

Permalink
ignore files in distDirs
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 7, 2023
1 parent 3a9b86e commit a391d2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generate-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ const distIgnoreFiles = [ 'index.html' ];

fs.writeFileSync('dist/index.html', toHTML('dist', getFiles('dist', rootIgnoreFiles)));

const distDirs = fs.readdirSync('dist').filter(d => !distIgnoreFiles.includes(d)).sort();
const distDirs = fs.readdirSync('dist', { withFileTypes: true })
.filter(d => d.isDirectory())
.map(d => d.name)
.sort();

for (const d of distDirs) {
const distDir = `dist/${d}`;
Expand Down

0 comments on commit a391d2f

Please sign in to comment.