INNER CODE UNIT · JavaScript
bundleEpub
danburzo/percollate · index.js:444
async function bundleEpub(items, options) {
const DEFAULT_STYLESHEET = new URL(
'templates/default.css',
import.meta.url
);
const style =
(await readFile(options.style || DEFAULT_STYLESHEET, 'utf8')) +
(options.hyphenate === true ? JUSTIFY_CSS : '') +
(options.css || '');
err.write('Saving EPUB...\n');
const output_path = outputPath(items, options, '.epub', options.slugCache);
const title =
options.title || (items.length === 1 ? items[0].title : 'Untitled');
const author =
options.author || (items.length === 1 ? items[0].byline : undefined);