epub-check

0.3.0 • Public • Published

epub-check

Asychronously validate an expanded EPUB with Node ^7.6, using the most recent release of epubcheck, currently v4.0.2.

Install

yarn add epub-check

Usage

Require or import as epubCheck, then call epubCheck('path/to/expanded/epub/directory').

epubCheck then returns a Promise which resolves with an object that includes pass/fail data, and an array of error and warning messages*, if any.

{ pass: true, messages: [] }

or

{ pass: false,
  messages: [{
    'type': '',  // epubcheck message type, e.g. 'ERROR(RSC-012)'
    'file': '',  // file path and name, relative to the given directory
    'line': '',  // line number
    'col': '',   // column number
    'msg': ''    // error or warning message, e.g. 'Fragment identifier is not defined.'
    }
  ]
}

*This package supresses warnings about any "non-standard font media type." So, feel free to use standardized font media types without getting bugged about it.

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i epub-check

    Weekly Downloads

    19

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    15.9 MB

    Total Files

    27

    Last publish

    Collaborators

    • westonlit