Never Play Matchmaker

    @readium-js/cfi

    1.0.0-alpha.2 • Public • Published

    Readium JS - CFI

    EPUB3 CFI utility library in JavaScript

    Installation

    Using npm / yarn

    npm install @readium-js/cfi

    or

    yarn add @readium-js/cfi

    Importing

    This library is bundled in UMD and ES module formats.

    • CommonJS
    const EPUBcfi = require('@readium-js/cfi');
    • ES Modules
    import * as EPUBcfi from '@readium-js/cfi';
    • Globally with window.EPUBcfi
    <script src="readium-js-cfi.umd.js"></script>

    Usage in non-browser environments (Node)

    Currently not supported as the implementation depends on jQuery and the DOM.

    A subset of the API could work without a browser, which may be planned for a future release.

    Development

    Prerequisites:

    • Node JS

    Initial setup:

    • npm install

    Typical workflow:

    • Hack away! (mostly the source code in ./src and ./test/specs )
    • npm run build (to update the output bundles in the dist folder)

    Unit tests:

    • npm run test

    Bundled outputs

    The dist directory contains bundled scripts in two module formats:

    UMD - Universal Module Definition

    readium-js-cfi.umd.js (and its associated source-map file), which aggregates all the required code (external library dependencies included, such as jQuery, etc.)

    You can include this as CommonJS/AMD or with the global EPUBcfi

    Works best for when using Browserify or RequireJS

    ES Modules

    readium-js-cfi.esm.js (and its associated source-map file), also aggregates all the required code

    Works best for rollup.js or webpack

    NPM package

    NPM packages "owned" and maintained by the Readium Foundation are listed here: https://www.npmjs.com/~readium-js

    License

    BSD-3-Clause ( http://opensource.org/licenses/BSD-3-Clause )

    See LICENSE.

    Install

    npm i @readium-js/cfi

    DownloadsWeekly Downloads

    0

    Version

    1.0.0-alpha.2

    License

    BSD-3-Clause

    Unpacked Size

    5.51 kB

    Total Files

    3

    Last publish

    Collaborators

    • jccr