diff --git a/scripts/generate-readmes b/scripts/generate-readmes index 433a69e532..9facf7e166 100755 --- a/scripts/generate-readmes +++ b/scripts/generate-readmes @@ -36,7 +36,12 @@ const paths = { }; function generateDocs(directory, callback) { - const {name, main} = load.sync(path.join(directory, 'package.json')); + const pkgPath = path.join(directory, 'package.json'); + if (!fs.existsSync(pkgPath)) { + bar.tick(); + return callback(null); + } + const {name, main} = load.sync(pkgPath); const pkgMain = path.join(directory, main); // Build Documentation