diff options
Diffstat (limited to 'lib/epub.js/src/epub.js')
-rw-r--r-- | lib/epub.js/src/epub.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/epub.js/src/epub.js b/lib/epub.js/src/epub.js new file mode 100644 index 0000000..e6fcdfb --- /dev/null +++ b/lib/epub.js/src/epub.js @@ -0,0 +1,35 @@ +import Book from "./book"; +import Rendition from "./rendition"; +import CFI from "./epubcfi"; +import Contents from "./contents"; +import * as utils from "./utils/core"; +import { EPUBJS_VERSION } from "./utils/constants"; + +import IframeView from "./managers/views/iframe"; +import DefaultViewManager from "./managers/default"; +import ContinuousViewManager from "./managers/continuous"; + +/** + * Creates a new Book + * @param {string|ArrayBuffer} url URL, Path or ArrayBuffer + * @param {object} options to pass to the book + * @returns {Book} a new Book object + * @example ePub("/path/to/book.epub", {}) + */ +function ePub(url, options) { + return new Book(url, options); +} + +ePub.VERSION = EPUBJS_VERSION; + +if (typeof(global) !== "undefined") { + global.EPUBJS_VERSION = EPUBJS_VERSION; +} + +ePub.Book = Book; +ePub.Rendition = Rendition; +ePub.Contents = Contents; +ePub.CFI = CFI; +ePub.utils = utils; + +export default ePub; |