mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-21 14:49:51 -04:00
makeDocxBook: the docx blob goes straight to mammoth.convertToHtml
(mammoth unzips internally; the browser entry takes {arrayBuffer}, the
node entry {buffer}). Converted HTML is sectioned at block-element
boundaries into ~150KB chunks (string-level — no DOMParser), giving a
Part N TOC; images inline as data URIs by default.
makeBook: zip files whose entries contain word/document.xml route to
the docx branch before the EPUB fallback (previously they died inside
new EPUB(...) on the missing container.xml).
mammoth is the fork's first runtime dependency: updates and security
fixes flow via semver; the browser-field mappings swap its node unzip
for the browser one; the dynamic import keeps it out of every other
format's path.
51 lines
1.0 KiB
JSON
51 lines
1.0 KiB
JSON
{
|
|
"name": "foliate-js",
|
|
"version": "0.3.0",
|
|
"description": "Render e-books in the browser",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/johnfactotum/foliate-js.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/johnfactotum/foliate-js/issues"
|
|
},
|
|
"homepage": "https://github.com/johnfactotum/foliate-js#readme",
|
|
"author": "John Factotum",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"exports": {
|
|
"./*.js": "./*.js"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.9.1",
|
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
"@rollup/plugin-terser": "^0.4.4",
|
|
"@zip.js/zip.js": "^2.7.52",
|
|
"fflate": "^0.8.2",
|
|
"fs-extra": "^11.2.0",
|
|
"globals": "^15.9.0",
|
|
"pdfjs-dist": "^5.5.207",
|
|
"rollup": "^4.22.4"
|
|
},
|
|
"scripts": {
|
|
"build": "npx rollup -c"
|
|
},
|
|
"keywords": [
|
|
"ebook",
|
|
"reader",
|
|
"epub",
|
|
"cfi",
|
|
"mobi",
|
|
"azw",
|
|
"azw3",
|
|
"fb2",
|
|
"cbz",
|
|
"dictd",
|
|
"stardict",
|
|
"opds"
|
|
],
|
|
"dependencies": {
|
|
"mammoth": "^1.13.0"
|
|
}
|
|
}
|