Visor de libro digital de la Editorial Médica Panamericana
npm install emp-ebooks-reader[![Build Status][travis-image]][travis-url]
[![Appveyor Build Status][appveyor-image]][appveyor-url]
[![Dependency Status][david_img]][david_site]
[![Github Tag][github-tag-image]][github-tag-url]











Electron application boilerplate based on React, Redux, React Router, Webpack, React Transform HMR for rapid application development.
* Note: requires a node version >= 7 and an npm version >= 4.
* If you have installation or compilation issues with this project, please see our debugging guide
First, clone the repo via git:
``bash`
git clone --depth=1 https://github.com/chentsulin/electron-react-boilerplate.git your-project-name
And then install dependencies with yarn.
`bash`
$ cd your-project-name
$ yarnnpm install
Note: If you can't use yarn for some reason, try .
Start the app in the dev environment. This starts the renderer process in hot-module-replacement mode and starts a server that sends hot updates to the renderer process:
`bash`
$ npm run dev
Run these two commands __simultaneously__ in different console tabs:
`bash`
$ npm run start-renderer-dev
$ npm run start-main-dev
bash
apm install editorconfig es6-javascript atom-ternjs javascript-snippets linter linter-eslint language-babel autocomplete-modules file-icons
`VSCode
* Editorconfig
* ESLint
* Flow
* Babel
* Jest
* ES6 Snippets
* React Snippets
:bulb: If you are using the
flow-for-vscode plugin, make sure to disable the flowtype-errors/show-errors eslint rule in the .eslintrc by setting it to 0Sublime
* Editorconfig Integration
* Linting
* ESLint Integration
* Syntax Highlighting
* Autocompletion
* Node Snippets
* ES6 Snippets
Others
* Editorconfig
* ESLint
* Babel Syntax Plugin
DevTools
#### Toggle Chrome DevTools
- OS X: Cmd Alt I or F12
- Linux: Ctrl Shift I or F12
- Windows: Ctrl Shift I or F12
See electron-debug for more information.
#### DevTools extension
This boilerplate includes the following DevTools extensions:
* Devtron - Install via electron-debug.
* React Developer Tools - Install via electron-devtools-installer.
* Redux DevTools - Install via electron-devtools-installer.
You can find the tabs on Chrome DevTools.
If you want to update extensions version, please set
UPGRADE_EXTENSIONS env, just run:`bash
$ UPGRADE_EXTENSIONS=1 npm run devFor Windows
$ set UPGRADE_EXTENSIONS=1 && npm run dev
`:bulb: You can debug your production build with devtools by simply setting the
DEBUG_PROD env variable:
`
DEBUG_PROD=true npm run package
`
CSS Modules
This boilerplate is configured to use css-modules out of the box.
All
.css file extensions will use css-modules unless it has .global.css.If you need global styles, stylesheets with
.global.css will not go through the
css-modules loader. e.g. app.global.cssIf you want to import global css libraries (like
bootstrap), you can just write the following code in .global.css:`css
@import "~bootstrap/dist/css/bootstrap.css";
`Sass support
If you want to use Sass in your app, you only need to import
.sass files instead of .css once:
`js
import './app.global.scss';
`Packaging
To package apps for the local platform:
`bash
$ npm run package
`To package apps for all platforms:
First, refer to Multi Platform Build for dependencies.
Then,
`bash
$ npm run package-all
`To package apps with options:
`bash
$ npm run package -- --[option]
`Further commands
To run the application without packaging run
`bash
$ npm run build
$ npm start
`To run End-to-End Test
`bash
$ npm run build
$ npm run test-e2e
`#### Options
See electron-builder CLI Usage
How to add modules to the project
You will need to add other modules to this boilerplate, depending on the requirements of your project. For example, you may want to add node-postgres to communicate with PostgreSQL database, or
material-ui to reuse react UI components.
⚠️ Please read the following section before installing any dependencies ⚠️
$3
This boilerplate uses a two package.json structure. This means, you will have two
package.json files.1.
./package.json in the root of your project
1. ./app/package.json inside app folder$3
Rule of thumb is: all modules go into
./package.json except native modules. Native modules go into ./app/package.json.1. If the module is native to a platform (like node-postgres) 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. Examples of such modules are material-ui, redux-form, and moment.
3. Otherwise, modules used for building, testing and debugging should be included in devDependencies in ./package.json.$3
See the wiki page, Module Structure — Two package.json Structure to understand what is native module, the rationale behind two package.json structure and more.
For an example app that uses this boilerplate and packages native dependencies, see erb-sqlite-example.
Static Type Checking
This project comes with Flow support out of the box! You can annotate your code with types, get Flow errors as ESLint errors, and get type errors during runtime during development. Types are completely optional.Native-like UI
If you want to have native-like User Interface (OS X El Capitan and Windows 10), react-desktop may perfect suit for you.
Dispatching redux actions from main process
see discusses in #118 and #108
How to keep the boilerplate updated
If your application is a fork from this repo, you can add this repo to another git remote:
`sh
git remote add upstream https://github.com/chentsulin/electron-react-boilerplate.git
`Then, use git to merge some latest commits:
`sh
git pull upstream master
``- C. T. Lin
- Jhen-Jie Hong
- Amila Welihinda
Support us with a monthly donation and help us continue our activities. [Become a backer]
Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]
[npm-image]: https://img.shields.io/npm/v/electron-react-boilerplate.svg?style=flat-square
[github-tag-image]: https://img.shields.io/github/tag/chentsulin/electron-react-boilerplate.svg
[github-tag-url]: https://github.com/chentsulin/electron-react-boilerplate/releases/latest
[travis-image]: https://travis-ci.org/chentsulin/electron-react-boilerplate.svg?branch=master
[travis-url]: https://travis-ci.org/chentsulin/electron-react-boilerplate
[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/chentsulin/electron-react-boilerplate?svg=true
[appveyor-url]: https://ci.appveyor.com/project/chentsulin/electron-react-boilerplate/branch/master
[david_img]: https://img.shields.io/david/chentsulin/electron-react-boilerplate.svg
[david_site]: https://david-dm.org/chentsulin/electron-react-boilerplate