This commit is contained in:
candux 2025-03-12 07:05:04 +00:00 committed by GitHub
commit adbe148038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -320,21 +320,6 @@ async function start(opts) {
startupPromises.push(serve_data.add(options, serving.data, item, id, opts));
}
if (options.serveAllStyles) {
fs.readdir(options.paths.styles, { withFileTypes: true }, (err, files) => {
if (err) {
return;
}
for (const file of files) {
if (file.isFile() && path.extname(file.name).toLowerCase() == '.json') {
const id = path.basename(file.name, '.json');
const item = {
style: file.name,
};
addStyle(id, item, false, false);
}
}
});
const watcher = chokidar.watch(
path.join(options.paths.styles, '*.json'),
{},