Skip to content
Snippets Groups Projects
Commit d7807630 authored by ezsh's avatar ezsh
Browse files

gulp: simplify themes tasks

parent 77df3417
No related branches found
No related tags found
1 merge request!9103Replace all twine legacy scripts with Gulp task
...@@ -203,12 +203,9 @@ if (fs.statSync('.git').isDirectory()) { ...@@ -203,12 +203,9 @@ if (fs.statSync('.git').isDirectory()) {
gulp.task('buildHTML', gulp.series(prepare, 'compileStory')); gulp.task('buildHTML', gulp.series(prepare, 'compileStory'));
} }
const themeTasks = []; const themeTasks = fs.readdirSync('themes')
for (const entry of fs.readdirSync('themes')) { .filter(entry => fs.statSync(path.join('themes', entry)).isDirectory())
if (fs.statSync(path.join('themes', entry)).isDirectory()) { .map(entry => makeThemeCompilationTask(entry));
themeTasks.push(makeThemeCompilationTask(entry));
}
}
exports.html = gulp.series('buildHTML', moveHTMLInPlace); exports.html = gulp.series('buildHTML', moveHTMLInPlace);
exports.themes = gulp.parallel(themeTasks); exports.themes = gulp.parallel(themeTasks);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment