diff --git a/lib/scaffold.js b/lib/scaffold.js index 393d518..e1bdac8 100644 --- a/lib/scaffold.js +++ b/lib/scaffold.js @@ -17,6 +17,10 @@ life and limb, Taylor faces the dilemma of having to do the wrong things for the const NCX_FILENAME = "toc.ncx"; +const COVER_IMG_FILENAME = "cover.png"; +const COVER_XHTML_FILENAME = "cover.xhtml"; +const COVER_MIMETYPE = "image/png"; + module.exports = function (scaffoldingPath, bookPath, contentPath, chaptersPath, manifestPath) { return Promise.all([ cpr(scaffoldingPath, bookPath), @@ -49,16 +53,24 @@ function writeOpf(chapters, contentPath) { ${BOOK_AUTHOR} ${BOOK_PUBLISHER} ${BOOK_DESCRIPTION} + -${manifestChapters} + + +${manifestChapters} + ${spineChapters} + + + + `; return fs.writeFile(path.resolve(contentPath, "content.opf"), contents); diff --git a/scaffolding/OEBPS/cover.png b/scaffolding/OEBPS/cover.png new file mode 100644 index 0000000..04595ba Binary files /dev/null and b/scaffolding/OEBPS/cover.png differ diff --git a/scaffolding/OEBPS/cover.xhtml b/scaffolding/OEBPS/cover.xhtml new file mode 100644 index 0000000..2ae5042 --- /dev/null +++ b/scaffolding/OEBPS/cover.xhtml @@ -0,0 +1,20 @@ + + + + + Cover + + + + Worm + +