Skip to content

Instantly share code, notes, and snippets.

@jccr

jccr/readme.md Secret

Last active August 29, 2017 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jccr/105b17e9d10f26722a24e1c6678f9ae4 to your computer and use it in GitHub Desktop.
Save jccr/105b17e9d10f26722a24e1c6678f9ae4 to your computer and use it in GitHub Desktop.
Readium Hypothesis Setup

Readium viewer

Dev install

  1. To fetch everything you start off with a recursive clone command:
    • git clone --recursive -b develop https://github.com/readium/readium-js-viewer.git
  2. Update the submodules
    • cd readium-js-viewer
    • git submodule update --init --recursive
  3. Sometimes the submodule references get slightly out of sync so to ensure you are at the latest develop branch in all submodules you can run this:
    • git checkout develop && git submodule foreach --recursive "git checkout develop"
  4. Run npm run prepare:all or yarn run prepare:yarn:all
    • This will run some preparation scripts, may take a few mins
  5. Build once so the plugins get registered
    • npm run build
  6. Launch the dev server which will open your browser with the dev Readium instance
    • npm run http
  7. Or open this link in your preferred browser instead:
  8. Launch a book from the library view, for example the first book
    • You can now use Readium and the Hypothesis sidebar should appear. It's loaded by default on develop now.

Deployment

  1. Run the deployment build script
    • npm run dist
  2. Deploy the contents of ./dist/cloud-reader along with ./epub_content as a sub-directory to your web server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment