Skip to content

Commit

Permalink
build command for prod file
Browse files Browse the repository at this point in the history
  • Loading branch information
wonknu committed Aug 11, 2016
1 parent 3616ce4 commit a2d5cbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions dist/cli/Builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ var Builder = function Builder(root, folder, dest, flow) {
var page = new _.Page(json.abe_meta.link, text, json, true);
(0, _Save.saveHtml)(_.fileUtils.concatPath(root, dest + json.abe_meta.link), page.html);
console.log(_.fileUtils.concatPath(root, dest + json.abe_meta.link));
if (files[++index]) build(++index);
if (files[index + 1]) build(index + 1);
}).catch(function (e) {
console.error(e);
if (files[++index]) build(++index);
if (files[index + 1]) build(index + 1);
});
} else if (file.path.indexOf('.json') > -1) {
var json = _fsExtra2.default.readJsonSync(file.path);
Expand All @@ -56,12 +56,12 @@ var Builder = function Builder(root, folder, dest, flow) {
var page = new _.Page(json.abe_meta.link, text, json, true);
(0, _Save.saveHtml)(_.fileUtils.concatPath(root, dest + json.abe_meta.link), page.html);
console.log(_.fileUtils.concatPath(root, dest + json.abe_meta.link));
if (files[++index]) build(++index);
if (files[index + 1]) build(index + 1);
}).catch(function (e) {
console.error(e);
if (files[++index]) build(++index);
if (files[index + 1]) build(index + 1);
});
}
} else if (files[index + 1]) build(index + 1);
};

build(0);
Expand Down
9 changes: 5 additions & 4 deletions src/cli/Builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class Builder {
var page = new Page(json.abe_meta.link, text, json, true)
saveHtml(fileUtils.concatPath(root, dest + json.abe_meta.link), page.html)
console.log(fileUtils.concatPath(root, dest + json.abe_meta.link))
if(files[++index]) build(++index)
if(files[index + 1]) build(index + 1)
}).catch(function(e) {
console.error(e)
if(files[++index]) build(++index)
if(files[index + 1]) build(index + 1)
})
}
else if(file.path.indexOf('.json') > -1){
Expand All @@ -55,12 +55,13 @@ class Builder {
var page = new Page(json.abe_meta.link, text, json, true)
saveHtml(fileUtils.concatPath(root, dest + json.abe_meta.link), page.html)
console.log(fileUtils.concatPath(root, dest + json.abe_meta.link))
if(files[++index]) build(++index)
if(files[index + 1]) build(index + 1)
}).catch(function(e) {
console.error(e)
if(files[++index]) build(++index)
if(files[index + 1]) build(index + 1)
})
}
else if(files[index + 1]) build(index + 1)
}

build(0)
Expand Down

0 comments on commit a2d5cbf

Please sign in to comment.