Skip to content
A javascript-based ePub builder
JavaScript CSS
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
templates
.bowerrc
.gitignore
.jshintrc
EPubBuilder.js
EPubBuilder.min.js
README.md
bower.json
gulpfile.js
index.html
package.json
templates.js

README.md

EPubBuilder.js

A javascript-based epub file builder.

Syntax

The scripts works by creating a Book Constructor, that accepts two arguments:

  • An array of chapters or an object of Metadata.
  • A callback that recives a book argument
new Book({
    title:'Book Title',
    author:'Book Author',
    chapters:[Array of Chapters]
},callback);

or

new Book([Array of Chapters],callback);

Config

The only dependency the script has is a folder of templates, the oath to which needs to be configured using the setting Book.config.templatePath.

It also counts with an option to validate the chapters xhtml inputed to avoid faulty ePubs. This option can be tuned on with the Book.config.validateXML option, which defaults to false.

Something went wrong with that request. Please try again.