Ensure some errors are logged to the console (#194)

* Clarify some error conditions in versioning

* Clarify missing doc error;

* Remove excess space

* Remove excess space part duex
This commit is contained in:
Héctor Ramos 2017-10-30 11:42:45 -07:00 committed by Joel Marcey
parent 47c955c7b0
commit 459984516b
3 changed files with 62 additions and 8 deletions

View file

@ -182,8 +182,15 @@ function processMetadata(file) {
// process metadata for all docs and save into core/metadata.js
function generateMetadataDocs() {
console.log("Generating Metadata for Docs....");
const order = readSidebar();
let order;
try {
order = readSidebar();
} catch (e) {
console.error(e);
process.exit(1);
}
const regexSubFolder = /translated_docs\/(.*)\/.*/;
const enabledLanguages = [];
@ -203,6 +210,7 @@ function generateMetadataDocs() {
if (extension === ".md" || extension === ".markdown") {
const res = processMetadata(file);
if (!res) {
return;
}