Javascript meets desktop. Electron with your favorite frontend libraries: react and styled-components.
Build process for common operating systems is included.
Project file system should be self explanatory. Both main and renderer process files are compiled by webpack and watched.
However if you need to have more than 1 renderer window then things become more complicated.
- import all windows files in
src/main/index.ts
- create webpack config in
webpack/renderer
(usewebpack/renderer/main
as template) - change scripts in
package.json
accordingly
It would be interesting to create this setup dynamic so that it would support n
windows. However, after finishing it I am honestly not sure if typescript
+ webpack
+ electron
is a good idea. 🤔 babel
and nodemon
would probably make all of this easier.
yarn start-renderer:dev
start webpack dev server and watch renderer files changesyarn start-main:dev
start nodemon and watch main process file changes
yarn build
build static javascript filesyarn dist
generate release distribution filesyarn start
start electron and use production static javascript files
yarn lint:ts
lint TS filesyarn lint:css
lint CSS
- Installing
electron@5
breaks webpack-dev-server.