1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Move EPUBJS_VERSION to Constants

This commit is contained in:
Fred Chasen 2018-07-26 11:28:55 -07:00
parent 2df8eefd3b
commit f9f6c126e0
5 changed files with 9 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "epubjs", "name": "epubjs",
"version": "0.3.65", "version": "0.3.66",
"description": "Parse and Render Epubs", "description": "Parse and Render Epubs",
"main": "lib/index.js", "main": "lib/index.js",
"module": "src/index.js", "module": "src/index.js",

View file

@ -13,10 +13,9 @@ import Rendition from "./rendition";
import Archive from "./archive"; import Archive from "./archive";
import request from "./utils/request"; import request from "./utils/request";
import EpubCFI from "./epubcfi"; import EpubCFI from "./epubcfi";
import { EVENTS } from "./utils/constants"; import { EPUBJS_VERSION, EVENTS } from "./utils/constants";
const CONTAINER_PATH = "META-INF/container.xml"; const CONTAINER_PATH = "META-INF/container.xml";
const EPUBJS_VERSION = "0.3";
const INPUT_TYPE = { const INPUT_TYPE = {
BINARY: "binary", BINARY: "binary",

View file

@ -3,7 +3,7 @@ import {isNumber, prefixed, borders, defaults} from "./utils/core";
import EpubCFI from "./epubcfi"; import EpubCFI from "./epubcfi";
import Mapping from "./mapping"; import Mapping from "./mapping";
import {replaceLinks} from "./utils/replacements"; import {replaceLinks} from "./utils/replacements";
import { EVENTS, DOM_EVENTS } from "./utils/constants"; import { EPUBJS_VERSION, EVENTS, DOM_EVENTS } from "./utils/constants";
const hasNavigator = typeof (navigator) !== "undefined"; const hasNavigator = typeof (navigator) !== "undefined";
@ -39,7 +39,7 @@ class Contents {
this.sectionIndex = sectionIndex || 0; this.sectionIndex = sectionIndex || 0;
this.cfiBase = cfiBase || ""; this.cfiBase = cfiBase || "";
this.epubReadingSystem("epub.js", ePub.VERSION); this.epubReadingSystem("epub.js", EPUBJS_VERSION);
this.listeners(); this.listeners();
} }

View file

@ -3,6 +3,7 @@ import Rendition from "./rendition";
import CFI from "./epubcfi"; import CFI from "./epubcfi";
import Contents from "./contents"; import Contents from "./contents";
import * as utils from "./utils/core"; import * as utils from "./utils/core";
import { EPUBJS_VERSION } from "./utils/constants";
import '../libs/url/url-polyfill' import '../libs/url/url-polyfill'
import IframeView from "./managers/views/iframe"; import IframeView from "./managers/views/iframe";
@ -20,10 +21,10 @@ function ePub(url, options) {
return new Book(url, options); return new Book(url, options);
} }
ePub.VERSION = "0.3"; ePub.VERSION = EPUBJS_VERSION;
if (typeof(global) !== "undefined") { if (typeof(global) !== "undefined") {
global.EPUBJS_VERSION = ePub.VERSION; global.EPUBJS_VERSION = EPUBJS_VERSION;
} }
ePub.Book = Book; ePub.Book = Book;

View file

@ -1,3 +1,5 @@
export const EPUBJS_VERSION = "0.3";
// Dom events to listen for // Dom events to listen for
export const DOM_EVENTS = ["keydown", "keyup", "keypressed", "mouseup", "mousedown", "click", "touchend", "touchstart"]; export const DOM_EVENTS = ["keydown", "keyup", "keypressed", "mouseup", "mousedown", "click", "touchend", "touchstart"];