Skip to content

Commit

Permalink
build-pdf.js: allow to force-generate one file (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfhandl authored Aug 3, 2023
1 parent 13b2ad0 commit 3c1cfb8
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 3c1cfb8

Please sign in to comment.