This fork is meant for a web-based epub reader, where the initial bookPath
is set via template variable in dist/template.html, e.g. with PHP Twig or Python Jinja2, and the epub content is served from the original .epub file via a PHP or Python script like src/zipfs.php, e.g. with bookPath = http://localhost:8000/zipfs.php/{bookId}/
The dist/ files are available as:
- PHP composer package: mikespub/epubjs-reader, or
- NPM javascript package: @mikespub/epubjs-reader.
Epub.js library.
Open up epubjs-reader in a browser.
You can change the ePub it opens by passing a link to bookPath in the url:
?bookPath=https://s3.amazonaws.com/epubjs/books/alice.epub
Install node.js
Then install the project dependences with npm
npm install
You can run the reader locally with the command
npm run serve
Builds are concatenated and minified using webpack
To generate a new build run
npm run build