cra-template-electron-builder

1.3.0 • Public • Published

cra-template-electron-builder

This is a create-react-app (CRA) template for Electron applications based on the official base template for Create React App.

Getting Started

To create a React-Electron application and run it in dev mode, run:

npx create-react-app my-app --template electron-builder
cd my-app
npm start

These commands will do the following:

  1. Create a React-Electron application called my-app using the CRA electron-builder template.
  2. Change the current directory to my-app
  3. Launch the application in dev mode, with hot reloading and the Developer tools console installed with React DevTools extension

For more information on how to use CRA, see the Create React App docs.

Distribution

This template uses electron-builder to package and build a ready for distribution application for Windows, macOS and Linux.

To build the application, run:

npm run dist:win
npm run dist:mac
npm run dist:linux

These commands will generate distributables for Windows, macOS and Linux respectively. By default, the distributables will be in NSIS (Windows), dmg (macOS) and deb (linux) form.

Remember to change the author, description, build.appId and build.productName in package.json before creating a distributable

Typescript

For creating an application using Typescript, use the CRA electron-builder-typescript template.

npx create-react-app my-app --template electron-builder-typescript
cd my-app
npm start

Package Sidebar

Install

npm i cra-template-electron-builder

Weekly Downloads

7

Version

1.3.0

License

MIT

Unpacked Size

39.6 kB

Total Files

23

Last publish

Collaborators

  • jlkp001