InfiniteLibrary / infinite-electron

An Electron-based cross-platform desktop reader for free ebooks
MIT License
38 stars 3 forks source link
ebooks electron epub react

infinite-electron

An Electron-based cross-platform desktop reader for free ebooks (EPUB) from Project Gutenberg and Unglue.it. The InfiniteLibrary team has grown out of two Codex Hackathons.

Infinite Reader

Stretch goals

Installation

If you don't have yarn, see https://yarnpkg.com/en/docs/install.

$ cd [infinite-electron path]
$ yarn

Run

Run these two commands simultaneously in different console tabs.

$ yarn run hot-server
$ yarn run start-hot

or run two servers with one command

$ yarn run dev

DevTools

Toggle Chrome DevTools

See electron-debug for more information.

DevTools extension

This boilerplate is included following DevTools extensions:

You can find the tabs on Chrome DevTools.

If you want to update extensions version, please set UPGRADE_EXTENSIONS env, just run:

$ UPGRADE_EXTENSIONS=1 yarn run dev

# For Windows
$ set UPGRADE_EXTENSIONS=1 && yarn run dev

Packaging

To package apps for the local platform:

$ yarn run package

To package apps for all platforms:

First, refer to Multi Platform Build for dependencies.

Then,

$ yarn run package-all

To package apps with options:

$ yarn run package -- --[option]

Further commands

To run the application without packaging run

$ yarn run build
$ yarn start

Options

See electron-builder CLI Usage

Module Structure

This boilerplate uses a two package.json structure.

  1. If the module is native to a platform or otherwise should be included with the published package (i.e. bcrypt, openbci), it should be listed under dependencies in ./app/package.json.
  2. If a module is imported by another module, include it in dependencies in ./package.json. See this ESLint rule.
  3. Otherwise, modules used for building, testing and debugging should be included in devDependencies in ./package.json.