- Install packages:
yarn
- Update your
.env
to specify yourAUTH_ENDPOINT
. This is the service we have to exchange a Slack auth code for an access token. - Run
yarn electron:dev
to start the Electron and React appss
- Run
yarn electron:build
to compile - Run
yarn electron:dist
to create.dmg
file.
- Bump the package version in
package.json
- First run the build command (see
Distribution
) - Run
yarn electron:deploy
. Make sure you have anelectron-builder.yml
file locally that looks like this:
appId: com.waylt.electron
publish:
provider: github
token: <GH_TOKEN>
extends: null
files:
- ./build/**/*
- ./node_modules/**/*
- ./package.json
directories:
buildResources: assets
mac:
hardenedRuntime: true
entitlements: ./build/entitlements.mac.inherit.plist
afterSign: ./notarize.js
You should also add APPLEID
, APPLEIDPASS
as per the electron-notarize docs.
There are cases where you want to debug the production build since the behavior can differ slightly. To do this, first create the .dmg
(Refer to Distribution
instructions above) and run the application. Then do the following:
lldb /Applications/slackify-mac.app
run --remote-debugging-port=8315
- Open http://localhost:8315/
You should now see the electron logs in the terminal, and the React logs in the local debugger.