Skip to content
Aferdita edited this page Jan 28, 2020 · 11 revisions

Welcome to the R2D2BC wiki!

GitHub Package Registry

Configuring NPM for use with GitHub Package Registry
Installing a package from GitHub Package Registry

Install from the command line:

$ npm install @d-i-t-a/[email protected]

Install via package.json:

"@d-i-t-a/reader": "1.0.3"
  1. Initialize Reader
  2. Injectables
    1. Readium CSS
    2. Footnotes
    3. Glossary
    4. Fonts
  3. Reader API
    1. User Settings API
    2. Navigator API
    3. Bookmark API
  4. Callback API
  5. Modules
    1. Bookmarks

Quickstart (Developer)

Clone this repo, then

npm install

Examples

Examples demonstrate how this webpub-viewer can be used:

  1. with assets served by r2-streamer-js (in-memory model);

Streamed

The examples/streamed folder contains the webpub-viewer (readers/viewer folder), the r2-streamer-js (ES6/ES2015 bundle in server folder) and example files (epubs folder).

In this example, assets are served by the r2-streamer-js (in-memory model).

This example runs on http.

Usage

  • Update the web reader files if needed (npm run examples)
  • Start the server with npm run streamed
npm run build && npm run examples && npm run streamed
  • Open http://localhost:4444 in the browser
  • Pick a publication
  • You can see its manifest (json) and open it in the webpub-viewer of your choice
  • To stop the server, type ctrl + c

Icons

Icons used in the shared version are part of the official Material Design Icons collection (outline version).

Clone this wiki locally