Skip to content

Commit

Permalink
Update build-pdf.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl committed Aug 3, 2023
1 parent 13b2ad0 commit ed7788e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/build-pdf.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
const iterator = require("./iterator");
const pdf = require("./pdf.js");

const doc = process.argv[2];

iterator(function (srcname, name, variant, meta) {
pdf(name, variant, meta)
if (doc && doc !== name) return;
pdf(name, variant, meta, doc === name)
.then((refreshed) => {
console.log(refreshed ? "✓" : "=", srcname, variant);
console.log(
refreshed ? "✓" : "=",
srcname,
variant === "meta" ? "" : variant
);
})
.catch((error) => {
console.log("❌", srcname, variant);
console.log("❌", srcname, variant === "meta" ? "" : variant);
console.error(error);
process.exitCode = 1;
});
Expand Down

0 comments on commit ed7788e

Please sign in to comment.