Skip to content

Commit

Permalink
prep 2.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickarlt committed Feb 24, 2019
1 parent a7e283e commit ecb8168
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

[Upcoming Changes](https://github.com/patrickarlt/acetate/compare/v2.0.3...master)

## [2.0.5] - 2019-02-24

- Changes to `ignore`, `dest` and `url` are now respected when set in transforms.

## [2.0.4] - 2019-02-23

- Check the resolved version of the pathname inside the `{% link %}` helper to determine if the `is-active` class should be applied.
Expand Down
26 changes: 15 additions & 11 deletions lib/modes/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,27 @@ module.exports = function build(acetate) {

return acetate
.getPages()
.then(pages => pages.filter(p => !p.ignore))
.then(function(pages) {
return new Promise(function(resolve, reject) {
const buildQueue = async.queue(function(page, callback) {
return acetate
.transformPage(page)
.then(page => acetate.renderPage(page))
.then(output => {
const outputPath = path.join(acetate.outDir, page.dest);
const outputDirectory = path.join(
acetate.outDir,
path.dirname(page.dest)
);
.then(finalPage => {
if (finalPage.ignore) {
return Promise.resolve();
} else {
const outputPath = path.join(acetate.outDir, finalPage.dest);
const outputDirectory = path.join(
acetate.outDir,
path.dirname(finalPage.dest)
);

return Promise.all([mkdirp(outputDirectory)]).then(() => {
return writeFile(outputPath, output);
});
return mkdirp(outputDirectory)
.then(() => acetate.renderPage(finalPage))
.then(content => {
return writeFile(outputPath, content);
});
}
})
.then(callback)
.catch(e => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "acetate",
"description": "A layout and templating framework for static websites.",
"version": "2.0.4",
"version": "2.0.5",
"author": "Patrick Arlt <[email protected]> (https://patrickarlt.com/)",
"babel": {
"presets": [
Expand Down

0 comments on commit ecb8168

Please sign in to comment.