{"_id":"epub.js","_rev":"10-825e8fa4722e684e29725e7027b29141","name":"epub.js","description":"Render ePub documents in the browser, across many devices","dist-tags":{"latest":"0.2.15"},"versions":{"0.2.8":{"name":"epub.js","version":"0.2.8","repository":{"type":"git","url":"https://github.com/futurepress/epub.js"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"server":"tools/server","start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"gitHead":"7fae49e22f7ba17d80f6b095564146d846a0f34f","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"homepage":"https://github.com/futurepress/epub.js","_id":"epub.js@0.2.8","_shasum":"dab110de18be42136f63273d202213de4a2891a0","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.31","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"dist":{"shasum":"dab110de18be42136f63273d202213de4a2891a0","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.8.tgz","integrity":"sha512-1DyTpkgsRge1F0IdE3EyxhUV44HLPfHXCvdTvmxv+oi8N75EB2ayMRPDVhwmXXtuzAECJwyOdASekSGwgXKR4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAa+KjGnPnfp9xNR5kxdKtUe3JnLEFfyTPkXordZfyMXAiEAqXSljeYjyy5aH0x0dXiuGM+GEcjirPGUMbAnvidBCqA="}]},"deprecated":"Package now published as epubjs"},"0.2.10":{"name":"epub.js","version":"0.2.10","repository":{"type":"git","url":"https://github.com/futurepress/epub.js"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"dependencies":{"jquery":"^2.1.4","jszip":"^2.5.0","localforage":"^1.2.10","rsvp":"^3.1.0","screenfull":"^2.0.0"},"gitHead":"861564d5ed925e14af15cf9e8ef07476691491fa","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"homepage":"https://github.com/futurepress/epub.js","_id":"epub.js@0.2.10","_shasum":"8e92f62e3e10e2075c4fa7bf52342b91d6f77fa5","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.31","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"dist":{"shasum":"8e92f62e3e10e2075c4fa7bf52342b91d6f77fa5","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.10.tgz","integrity":"sha512-gh6mdrqahVJHTDCBR9Yv2uQ6BwpYL7ejPU7iPsIOsLOVdN7NtcTZONNnmuPY0AlLVPOuepySYfLu3CkA+NsZAQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGSWB5hv6lI0yFIcOMq4Ae/vPm4l8ZdK/MVKE5TPW4J8AiEA6ic3GEVT8NhwENr68k4qZMepSBKeZMPMpjmv+2UvMek="}]},"deprecated":"Package now published as epubjs"},"0.2.11":{"name":"epub.js","version":"0.2.11","repository":{"type":"git","url":"https://github.com/futurepress/epub.js"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"dependencies":{"jquery":"^2.1.4","jszip":"^2.5.0","localforage":"^1.2.10","rsvp":"^3.1.0","screenfull":"^2.0.0"},"gitHead":"a9136f95ecfa77d2cc6e74a9efea754a80a47423","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"homepage":"https://github.com/futurepress/epub.js","_id":"epub.js@0.2.11","_shasum":"0af0e6d4f7e5ef3a664804f1befde7beae9c89a1","_from":".","_npmVersion":"2.1.17","_nodeVersion":"0.10.31","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"dist":{"shasum":"0af0e6d4f7e5ef3a664804f1befde7beae9c89a1","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.11.tgz","integrity":"sha512-2x3kWMx5q2VwN6yIvHMpSMb3xU2Id64hnV2XBIbhB+PnTvtAyRjHSOjs0FGhkl4W9Tp3WlOxScp0M9KBASNPRA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCO7w0piG14QIRAdx/ykqAekPL0a0vtwYIcj23Abq0+lgIhAOuV0ES2v9QoDtPH9v1lJS9SngYmI/5r3fq7ZmsqcO0W"}]},"deprecated":"Package now published as epubjs"},"0.2.13":{"name":"epub.js","version":"0.2.13","repository":{"type":"git","url":"git+https://github.com/futurepress/epub.js.git"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"dependencies":{"jquery":"^2.1.4","jszip":"^2.5.0","localforage":"^1.2.10","rsvp":"^3.1.0","screenfull":"^2.0.0"},"gitHead":"d19a0f37fc17c90e8f4f34fcefc5be9f8b739f6f","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"homepage":"https://github.com/futurepress/epub.js#readme","_id":"epub.js@0.2.13","_shasum":"2ea163d9e49f6f718115869e2f1b61300635ef33","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"dist":{"shasum":"2ea163d9e49f6f718115869e2f1b61300635ef33","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.13.tgz","integrity":"sha512-4jfdIP7cVvFsQThG1X+J8Gab+qfbksB1JPlRlZhvDZxwFe5C/wFtWS5tdyd5XSxidf+3CENWAQyxvfAvu6iphw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7TPB8c2VQpglJuzthtjep+SBdNrAtQdSZ6mBX6p76zAIgcgO02L3E9OaiOTHGBeKLzzVB+kutGFeFFrcFOJqSbU8="}]},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/epub.js-0.2.13.tgz_1455657940251_0.9574924395419657"},"deprecated":"Package now published as epubjs"},"0.2.14":{"name":"epub.js","version":"0.2.14","repository":{"type":"git","url":"git+https://github.com/futurepress/epub.js.git"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"dependencies":{"jquery":"^2.1.4","jszip":"^2.5.0","localforage":"^1.2.10","rsvp":"^3.1.0","screenfull":"^2.0.0"},"gitHead":"d8ba903e19fb077ec48d4cd9d0baf5973b1c096a","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"homepage":"https://github.com/futurepress/epub.js#readme","_id":"epub.js@0.2.14","_shasum":"057df5adf368cb16f7ae710b0056dc9ef75c7ff7","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.6.0","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"dist":{"shasum":"057df5adf368cb16f7ae710b0056dc9ef75c7ff7","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.14.tgz","integrity":"sha512-ZX12QDkYKY5dg5II2dr4ZC2QnI7OMPm+mjJ8hTRFk+rkQM1fe9Smoeo0Ge6JDG4+Lp9UWdR0ZYNlWDUzYuFT3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAsT0zlcxkuh0/0gUiIVDrN/KqyaoUKZdEP3RKlN3hpAiAeUAImxfNzE6nU/lAficVbSX6mn6y+w9bSCp2XtVw+vA=="}]},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/epub.js-0.2.14.tgz_1455659973294_0.18141436157748103"},"deprecated":"Package now published as epubjs"},"0.2.15":{"name":"epub.js","version":"0.2.15","repository":{"type":"git","url":"https://github.com/futurepress/epub.js"},"description":"Render ePub documents in the browser, across many devices","main":"server.js","directories":{"test":"tests"},"scripts":{"start":"node server.js"},"author":{"name":"fchasen@gmail.com"},"license":"FreeBSD","devDependencies":{"colors":"~0.6.2","connect":"~2.14.4","grunt":"~0.4.4","grunt-concat-sourcemap":"~0.4.1","grunt-contrib-concat":"~0.4.0","grunt-contrib-connect":"~0.7.1","grunt-contrib-copy":"~0.5.0","grunt-contrib-jshint":"~0.10.0","grunt-contrib-uglify":"~0.4.0","grunt-contrib-watch":"^0.6.1","optimist":"~0.6.1","portfinder":"~0.2.1"},"dependencies":{"jquery":"^2.1.4","jszip":"^2.5.0","localforage":"^1.2.10","rsvp":"^3.1.0","screenfull":"^2.0.0"},"gitHead":"1c69d081111c39eaa4d7eb36636b820e7559aff0","bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"_id":"epub.js@0.2.15","_shasum":"9e21f393a9d356a58679c9f7e9353fcd0aa556d0","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"fchasen","email":"fchasen@gmail.com"},"dist":{"shasum":"9e21f393a9d356a58679c9f7e9353fcd0aa556d0","tarball":"https://registry.npmjs.org/epub.js/-/epub.js-0.2.15.tgz","integrity":"sha512-xmj9pesnUyhBfB9xO1xm3bPB66R3HAhbVG07BvSaGyMyfOFLzWrHXNNxnzpawXzi9Qcc5ltVvLRpmQXCAPh02w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEP/b/rakInMMo3zbDHKzT9jucokoXFPkfAA/z2LMTD2AiEAju+U1k5HKv9gysl4FTBiPmGxsHaNapBG/OwlGBmlvlA="}]},"maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/epub.js-0.2.15.tgz_1477866864973_0.5885319218505174"},"deprecated":"Package now published as epubjs"}},"readme":"Epub.js\n================================\n\n![FuturePress Views](http://fchasen.com/futurepress/fp.png)\n\nEpub.js is a JavaScript library for rendering ePub documents in the browser, across many devices.\n\nEpub.js provides an interface for common ebook functions (such as rendering, persistence and pagination) without the need to develop a dedicated application or plugin. Importantly, it has an incredibly permissive [Free BSD](http://en.wikipedia.org/wiki/BSD_licenses) license.\n\n[Try it while reading Moby Dick](http://futurepress.github.com/epub.js/reader/)\n\n\nWhy EPUB\n-------------------------\n\n![Why EPUB](http://fchasen.com/futurepress/whyepub.png)\n\nThe [EPUB standard](http://www.idpf.org/epub/30/spec/epub30-overview.html) is a widely used and easily convertible format.  Many books are currently in this format, and it is convertible to many other formats (such as PDF, Mobi and iBooks).\n\nAn unzipped ePUB3 is a collection of HTML5 files, CSS, images and other media – just like any other website.  However, it enforces a schema of book components, which allows us to render a book and its parts based on a controlled vocabulary.  \n\nMore specifically, the ePUB schema standardizes the table of contents, provides a manifest that enables the caching of the entire book, and separates the storage of the content from how it’s displayed.\n\nGetting Started\n-------------------------\n\nGet the minified code from the build folder:\n\n```html\n<script src=\"../build/epub.min.js\"></script>\n```\n\nIf you plan on using compressed (zipped) epubs (any .epub file) include the minified version of [JSZip.js](http://stuk.github.io/jszip/) which can be found in [build/libs](https://raw.githubusercontent.com/futurepress/epub.js/master/build/libs/zip.min.js)\n\n```html\n<!-- Zip JS -->\n<script src=\"/build/libs/zip.min.js\"></script>\n```\n\nSetup a element to render to:\n\n```html\n<div onclick=\"Book.prevPage();\">‹</div>\n<div id=\"area\"></div>\n<div onclick=\"Book.nextPage();\">›</div>\n```\n\nCreate the new ePub, and then render it to that element:\n\n```html\n<script>\n\tvar Book = ePub(\"url/to/book/\");\n\tBook.renderTo(\"area\");\n</script>\n```\n\nSee the [Documentation](https://github.com/futurepress/epub.js/blob/master/documentation/README.md) to view events and methods for getting the books contents.\n\nThe [Examples](https://github.com/futurepress/epub.js/tree/master/examples) are likely the best place to learn how to use the library.\n\nInternet Explorer\n-------------------------\n\nCompatibility with IE is best with wicked-good-xpath, a Google-authored pure JavaScript implementation of the DOM Level 3 XPath specification (but not required). More info at https://code.google.com/p/wicked-good-xpath/\n\nYou can download the latest wgxpath [here](https://wicked-good-xpath.googlecode.com/svn/trunk/build/wgxpath.install.js) or from the examples folder.\n\n```html\n<script src=\"/examples/wgxpath.install.js\"></script>\n```\n\nThen install wgxpath via a hook like the one below:\n\n```javascript\nEPUBJS.Hooks.register(\"beforeChapterDisplay\").wgxpath = function(callback, renderer){\n\n  wgxpath.install(renderer.render.window);\n\n  if(callback) callback();\n};\n\nwgxpath.install(window);\n```\n\nThere are currently a [number of open issues for Internet Explorer](https://github.com/futurepress/epub.js/labels/Internet%20Explorer) any help addressing them would be greatly appreciated.\n\nRecent Updates\n-------------------------\n+ v2 splits the render method from the layout and renderer. Currently only iframe rendering is supported, but this change will allow for new render methods in the future. See the breaking changes to the renderer [here](https://github.com/futurepress/epub.js/blob/master/documentation/README.md#renderer).\n\n+ Work-in-progress pagination support using EPUB page-lists. See a [usage example](http://futurepress.github.io/epub.js/examples/pagination.html). ```renderer:pageChanged``` has changed to ```renderer:locationChanged``` and a ```book:pageChanged``` event was added to pass pagination events.\n\n+ Moved [Demo Reader](http://futurepress.github.com/epub.js/demo/) to ```/reader/``` and the source to ```/reader_src/```.\n\n+ Updated CFI handling to support text offsets. CFIs return wrapped like: ```\"epubcfi(/6/12[xepigraph_001]!4/2/28/2/1:0)\"```. Ranges to be added soon.\n\n+ Added support for [EPUB properties](http://www.idpf.org/epub/fxl/#property-orientation). This can be overridden in the settings and default to ```{spread: 'reflowable', layout: 'auto', orientation: 'auto'}```\n\n+ Updated [Documentation](https://github.com/futurepress/epub.js/blob/master/documentation/README.md)\n\n+ Many more [Tests](http://futurepress.github.io/epub.js/tests/)\n\n\nRunning Locally\n-------------------------\n\nInstall [node.js](http://nodejs.org/)\n\nThen install the project dependences with npm\n\n```javascript\nnpm install\n```\n\nYou can run the reader locally with the command\n\n```javascript\nnode server.js\n```\n\nBuilds are concatenated and minified using [gruntjs](http://gruntjs.com/getting-started)\n\nTo generate a new build run\n\n```javascript\ngrunt\n```\n\nOr, to generate builds as you make changes run\n\n```\ngrunt watch\n```\n\nExamples\n-------------------------\n\n+ [Single](http://futurepress.github.io/epub.js/examples/single.html)\n+ [Basic](http://futurepress.github.io/epub.js/examples/basic.html)\n+ [Contained Epub](http://futurepress.github.io/epub.js/examples/contained.html)\n+ [Promises](http://futurepress.github.io/epub.js/examples/promises.html)\n+ [Fixed Width & Height](http://futurepress.github.io/epub.js/examples/fixed.html)\n+ [Custom Element](http://futurepress.github.io/epub.js/examples/custom-elements.html)\n+ [MathML with MathJAX](http://futurepress.github.io/epub.js/examples/mathml.html)\n+ [Annotations with Hypothes.is](http://futurepress.github.io/epub.js/examples/hypothesis.html)\n+ [Pagination](http://futurepress.github.io/epub.js/examples/pagination.html)\n\n[View All Examples](http://futurepress.github.io/epub.js/examples/)\n\nTesting\n-------------------------\n\nOnce you start a server you can run the [QUnit](http://qunitjs.com/) tests at [http://localhost:8080/tests/](http://localhost:8080/tests/)\n\nYou can download the test books from https://github.com/futurepress/books by running:\n```\ngit submodule update --init --recursive\n```\n\nThen you can pull the latest with:\n```\ngit submodule foreach git pull origin master\n```\n\nHooks\n-------------------------\n\nSimilar to a plugins, Epub.js implements events that can be \"hooked\" into. Thus you can interact with and manipulate the contents of the book.\n\nExamples of this functionality is loading videos from YouTube links before displaying a chapters contents or implementing annotation.\n\nHooks require a event to latch onto and a callback for when they are finished.\n\nExample hook:\n\n```javascript\nEPUBJS.Hooks.register(\"beforeChapterDisplay\").example = function(callback, renderer){\n\n    var elements = render.doc.querySelectorAll('[video]'),\n        items = Array.prototype.slice.call(elements);\n\n    items.forEach(function(item){\n      //-- do something with the video item\n    }\n\n    if(callback) callback();\n\n}\n```\n\nAdditional Resources\n-------------------------\n\n[![Gitter Chat](https://badges.gitter.im/futurepress/epub.js.png)](https://gitter.im/futurepress/epub.js \"Gitter Chat\")\n\n[Epub.js Developer Mailing List](https://groups.google.com/forum/#!forum/epubjs)\n\nIRC Server: freenode.net Channel: #epub.js\n\nFollow us on twitter: @Epubjs\n\n+ http://twitter.com/#!/Epubjs\n\nOther\n-------------------------\n\nEPUB is a registered trademark of the [IDPF](http://idpf.org/).\n\n","maintainers":[{"name":"fchasen","email":"fchasen@gmail.com"}],"time":{"modified":"2022-06-17T07:40:03.735Z","created":"2015-08-12T20:45:37.928Z","0.2.8":"2015-08-12T20:45:37.928Z","0.2.10":"2015-09-17T19:15:13.967Z","0.2.11":"2015-09-25T15:30:07.179Z","0.2.13":"2016-02-16T21:26:14.513Z","0.2.14":"2016-02-16T22:00:02.824Z","0.2.15":"2016-10-30T22:34:25.756Z"},"repository":{"type":"git","url":"https://github.com/futurepress/epub.js"},"author":{"name":"fchasen@gmail.com"},"bugs":{"url":"https://github.com/futurepress/epub.js/issues"},"license":"FreeBSD","readmeFilename":"README.md","users":{"filipve":true}}