Skip to content

thomsa/electron-ts-react-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electron TypeScript & React Boilerplate

Another boilerplate for electron and react. This time Electron uses TypeScript with the latest available TS. The client app is created with create-react-app (CRA).

What is cool about this boilerplate?

It's lightweight and you need only 2 npm commands work with it! (as for now...)

npm|yarn start runs the whole application in development mode, which means you get hot-reload both for the react client AND for the electron application! If you change the client the CRA hot-reload fires, if the electron app, nodemon makes sure that you'll see your changes instantly!

npm|yarn electron-package-all creates builds for all available platforms, after creating a production build of both the CRA and the Electron app.

Easy as 1-2-3!

This boilerplate sets up the basis to develop and package your application quickly, it has no constraints on using certain libraries. If you want to add Redux, Flux, E2E frameworks, etc? Feel free to do so!

What is included besides Electron, React and TS?

  • Prettier with Husky! All your code is instantly formatted on every commit!
  • Dotenv for production settings! Use the electron/config.ts file to wrap your configuration!
  • Electron Builder to quickly build distributable packages!
  • typedi! Yes... Cause everyone needs some dependency injection sometimes.
  • Webpack! Well, obviously. Webpack builds both Electron and CRA.

What will you need to run the solution?

  • Node v13.x

What else is coming?

  • Electron Autoupdate!
  • Wrapper for Window and Modal handling!
  • react-router!
  • Boilerplate for communicating between Electron and React!
  • Testing Framework for Electron.
  • Something else will come to my mind later for sure...