Add KDP cover PDF generator
scripts/cover.js computes the exact cover canvas dimensions from the page count in book-meta.json (written by build.js), using the KDP Premium Color spine formula (0.002347 in/page), and renders a Nunjucks template to a single PDF containing back cover, spine, and front cover with bleed (0.125 in) and safe-zone overlay guides. - `pnpm cover` — generate output/cover.pdf - `pnpm all` — build interior + both PDFs in one command - Cover artwork slots: images/cover/front.png, images/cover/back.png Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,9 @@
|
||||
"scripts": {
|
||||
"build": "node scripts/build.js",
|
||||
"pdf": "node scripts/pdf.js",
|
||||
"cover": "node scripts/cover.js",
|
||||
"book": "pnpm build && pnpm pdf",
|
||||
"all": "pnpm build && pnpm pdf && pnpm cover",
|
||||
"watch": "node --watch scripts/build.js"
|
||||
},
|
||||
"pnpm": {
|
||||
|
||||
Reference in New Issue
Block a user