This is a test for automatically updating both installed and portable installations
- Set up for developing a React app in Electron
- Support for SCSS, Less and typescript
- Uses webpack in build process
- Hotloading during development
Assuming that the dev environment has been set up properly, you should be able to build a dev version of the project just by running npm run dev
in a terminal or commend prompt (from the project directory)
Please see CONTRIBUTING.md
- Install npm and node if not already installed (feel free to use yarn, but keep in mind that everything is set up to use npm)
- Clone repo to your pc
- Run npm install from project root to install dependencies
- Make sure that files for your dev environment are excluded in the
.gitignore
file
All commands are run with npm run commandname
(i.e. npm run dev
)
dev
: Launches both the Webpack dev environment and React-devtoolswebpack-dev
: Runs Webpack dev environment, with hotloading enabledreact-devtools
: Opens the React devtoolsclean
: Removes thedist/
directoryclean-npm
: Deletes all packages andpackage-lock.json
clean-all
: Runs all clean commandsrebuild-npm
: Cleans all npm packages and reinstalls all packages and dependenciespack
: Packs the source for distributionprebuild
: Run before building a new version- Build:
- The build command is formatted as
build-platform:type
, where platform can be eitherwin
,lin
ormac
, for building Windows, Linux or Mac OS respectively, and type can be eitherstable
,canary
ornext
. e.g.build-win:canary
would produce a canary version for windows. The reason for having separate commands for each type is to change the build config that is used.
- The build command is formatted as
(Structure subject to change)
project-folder/
├─ dist/
├─ compiled/
├─ src/
│ ├─ main/
│ │ └─ index.js
│ ├─ renderer/
│ │ └─ index.js
│ └─ common/
├─ config/
│ ├─ canary.json
│ ├─ next.json
│ └─ stable.json
├─ build/
└─ static/
Main process code (i.e. electron stuff)
Entry point for electron is index.js
Renderer code (i.e. react stuff)
Entry point for react is index.js
Common scripts that may be used for both processes
Things like application icons used in release builds
Files in this folder will not be compressed with webpack, and are accessible with the _static
variable (see here)
Extra configurations for some things are placed here (e.g. build configs for different channels)
Where stuff produced by webpack goes
When the project is compiled into a distributable format, then that goes here
Project Owner: Daniel Nichols (Hexellate)