Skip to content

Latest commit

 

History

History
95 lines (67 loc) · 3.47 KB

setup.md

File metadata and controls

95 lines (67 loc) · 3.47 KB

Development Environment Setup

Setup

Refer to the specific instructions for each platform:

Verification

Verify you have these commands available in your shell and that the found versions look similar to the below output:

$ node -v
v10.15.4

$ python --version
Python 2.7.15

There are also additional resources to configure your favourite editor to work nicely with the Kactus repository.

Building Kactus

First, create a fork of desktop/desktop and then clone the repository to your local machine. You'll need to be inside the repository in order to build the application locally.

The typical workflow to get up running is as follows:

  • Run npm install to get all required dependencies on your machine.
  • Run npm run build:dev to create a development build of the app.
  • Run npm run start to launch the application. Changes will be compiled in the background. The app can then be reloaded to see the changes (Ctrl/Command+Alt+R).

Optional Tip: You can use screen to avoid filling your terminal with logging output:

$ screen -S "kactus" npm run start # -S sets the name of the session; you can pick anything
$ # Your screen clears and shows logs. Press Ctrl+A then D to exit.
[detached]
$ screen -R "kactus" # to reopen the session, read the logs, and exit (Ctrl+C)
[screen is terminating]

If you've made changes in the main-process folder you need to run npm run build:dev to rebuild the package, and then npm run start for these changes to be reflected in the running app.

If you are using GitHub Enterprise with your development build of GitHub Desktop, you will need to follow a few extra steps to authenticate properly.

If you're still encountering issues with building, refer to our troubleshooting guide for more common problems.

Running tests

  • npm run test - Runs all unit and integration tests
  • npm run test:unit - Runs all unit tests
    • Add <file> or <pattern> argument to only run tests in the specified file or files matching a pattern
    • Add -t <regex> to only match tests whose name matches a regex
    • For more information on these and other arguments, see Jest CLI options
  • npm run test:integration - Runs all integration tests

Debugging

Electron ships with Chrome Dev Tools to assist with debugging, profiling and other measurement tools.

  1. Run the command npm start to launch the app
  2. Under the View menu, select Toggle Developer Tools

When running the app in development mode, React Dev Tools should automatically install itself on first start when in development mode.

An additional extension, Devtron, is also included but is disabled by default. To enable Devtron, select the Console tab in Chrome Developer Tools and run this command:

require('devtron').install()

The Next Steps

You're almost there! Here's a couple of things we recommend you read next:

  • Help Wanted - we've marked some tasks in the backlog that are ideal for external contributors
  • Notes for Contributors - some notes for new contributors getting started