Readium 2 "streamer" for NodeJS (TypeScript, ECMAScript 2015 / ES6)
Build status
TravisCI, develop
branch:

Prerequisites
- https://nodejs.org NodeJS >= 6, NPM >= 3 (check with
node --version
and npm --version
from the command line)
- https://yarnpkg.com Yarn >= 0.23 (check with
yarn --version
from the command line)
NPM package usage
https://www.npmjs.com/package/r2-streamer-js
yarn add r2-streamer-js
or npm install r2-streamer-js
...or manually, in your project's package.json
:
"dependencies": {
"r2-streamer-js": "latest"
}
In your Javascript code (ECMAScript 2015 / ES6) or TypeScript code (all *.d.ts
type definitions are included in ./node_modules/r2-streamer-js/**
):
import { * } from "r2-streamer-js";
import { Publication } from "r2-streamer-js/dist/src/models/publication";
Quick start
Command line steps:
cd r2-streamer-js
npm update --global
(sync NPM global packages)
yarn global upgrade
(sync Yarn global packages)
yarn install
(initialize local node_modules
packages from dependencies declared in package.json
)
yarn upgrade
(sync local packages)
yarn run build
(invoke the main build script: clean, lint, compile)
yarn test
(run the unit tests)
yarn run cli {PATH_TO_EPUB}
(command line publication "dump") (path is relative or absolute)
yarn run server {PATH_TO_EPUB}
(HTTP service to serve publication manifest and associated resources)