This is only relevant for Stoplight engineers.
- Stoplight Platform
- Node >= 7
Install the dev deps listed above.
yarn install && cd app && yarn install && cd ..
yarn start
Builds will be located in the /dist folder.
yarn build:production
This is useful: https://mkaz.blog/code/code-signing-a-windows-application/.
CSC_LINK, WIN_CSC_LINK, and CSC_KEY_PASSWORD must be set in your environment. For example:
Our mac cert is provided by apple developer program. Install it into your keychain, export it to .p12 from the keychain/login screen.
Our windows cert is provided by Digicert. Install it into your keychain, export it to .p12 from the keychain/login screen.
export CSC_LINK="~/Documents/Credentials/evario-cert/cert-mac.p12"
export WIN_CSC_LINK="~/Documents/Credentials/evario-cert/cert.p12"
export CSC_KEY_PASSWORD="123"
GH_TOKEN needs to be set in your environment.
Code signing needs to be setup.
- Increment app/package.json version property.
- Build Stoplight Platform, replace app/build with newly built public files (just files/folders in the public directory).
yarn release:production
- The desktop app MUST bundle ALL if its own variables. It will not inherit variables from hosted stoplight since it now bundles all of its own assets.
- Production environment variables are located in
app/.env
. - Development environment variables are located in
app/development.env
.
- Add its default production value (or set to empty string) to
app/.env
. - Add its default development value (or set to empty string) to
app/development.env
. - Add it to
app/utils/config/index.js
.
Notable directories and files:
The entry point to the application. This is run when it starts. This file opens a new Electron window, loading either a local instance of the API Dashboard (in development), or a remote instance of the dashboard.
This is a pre-script, run before the remote dashboard is loaded. Here, we set a global Electron variable, making several native node modules available to the Stoplight platform.