Skip to content

Commit

Permalink
Fix generateDocs script - handle missing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 31, 2017
1 parent 60000d1 commit 22c04ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/generate-readmes
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 22c04ff

Please sign in to comment.