Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Robinfr/electron-react-typescript
Electron boilerplate with React, Redux, and TypeScript
https://github.com/Robinfr/electron-react-typescript
boilerplate electron react redux typescript
Last synced: about 1 month ago
JSON representation
Electron boilerplate with React, Redux, and TypeScript
- Host: GitHub
- URL: https://github.com/Robinfr/electron-react-typescript
- Owner: Robinfr
- License: mit
- Created: 2018-01-15T12:51:56.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-04-20T04:24:04.000Z (over 1 year ago)
- Last Synced: 2024-05-16T12:05:36.648Z (7 months ago)
- Topics: boilerplate, electron, react, redux, typescript
- Language: TypeScript
- Size: 1.99 MB
- Stars: 430
- Watchers: 14
- Forks: 86
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# electron-react-typescript
### A Boilerplate for an Easy Start with TypeScript, React, and Electron.
[![React](docs/img/react.png)](https://reactjs.org/)
[![Webpack](docs/img/webpack.png)](https://webpack.js.org/)
[![TypeScript](docs/img/ts.png)](https://www.typescriptlang.org/)
[![Electron](docs/img/electron.png)](https://electronjs.org/)
[![Redux](docs/img/redux.png)](https://redux.js.org/)
[![Jest](docs/img/jest.png)](https://facebook.github.io/jest/)[Electron](https://electronjs.org/) application boilerplate based on [React](https://reactjs.org/), [Redux](https://redux.js.org/), and [Webpack](https://webpack.js.org/) for rapid application development using [TypeScript](https://www.typescriptlang.org/).
## Install
Clone the repository with Git:```bash
git clone --depth=1 [email protected]:Robinfr/electron-react-typescript.git
```And then install the dependencies:
```bash
cd
npm install
```## Usage
Both processes have to be started **simultaneously** in different console tabs:```bash
npm run start-renderer-dev
npm run start-main-dev
```This will start the application with hot-reload so you can instantly start developing your application.
You can also run do the following to start both in a single process:
```bash
npm run start-dev
```## Packaging
We use [Electron builder](https://www.electron.build/) to build and package the application. By default you can run the following to package for your current platform:```bash
npm run dist
```This will create a installer for your platform in the `releases` folder.
You can make builds for specific platforms (or multiple platforms) by using the options found [here](https://www.electron.build/cli). E.g. building for all platforms (Windows, Mac, Linux):
```bash
npm run dist -- -mwl
```## Husky and Prettier
This project comes with both Husky and Prettier setup to ensure a consistent code style.To change the code style, you can change the configuration in `.prettierrc`.
In case you want to get rid of this, you can removing the following from `package.json`:
1. Remove `precommit` from the `scripts` section
1. Remove the `lint-staged` section
1. Remove `lint-staged`, `prettier`, `eslint-config-prettier`, and `husky` from the `devDependencies`Also remove all mentions of Prettier from the `extends` section in `.eslintrc.json`.
## About this project
This project was set up from scratch but is heavily influenced by the [Electron React Boilerplate project](https://github.com/chentsulin/electron-react-boilerplate) and [React Redux TypeScript guide](https://github.com/piotrwitek/react-redux-typescript-guide).## License
MIT © [R. Franken](https://github.com/Robinfr)