Skip to content

Commit

Permalink
🐛 Fix meta genetion for node < 10.
Browse files Browse the repository at this point in the history
  • Loading branch information
T4rk1n committed Oct 20, 2019
1 parent b419004 commit 2ed8407
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 77 deletions.
144 changes: 72 additions & 72 deletions dazzler/assets/meta.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/internal/meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const src = args[0];
function walk(directory, components=null) {
return new Promise(resolve => {
components = components || {};
fs.readdirSync(src, {withFileTypes: true}).forEach(f => {
if (f.isDirectory()) {
fs.readdirSync(src).forEach(f => {
const filepath = path.join(directory, f);
if (fs.lstatSync(filepath).isDirectory()) {
components = walk(f, components);
} else {
const filepath = path.join(directory, f.name);
} else {
components[filepath] = reactDocs.parse(fs.readFileSync(filepath));
}
}
});
resolve(components);
});
Expand Down

0 comments on commit 2ed8407

Please sign in to comment.