Please take some time out to read these resources before you start contributing changes to GitHub Desktop.
You will need to install these tools:
- Nodejs - v7 is preferred as it's the version embedded into Electron
- Windows developers: Make sure you allow the Node.js installer to add node to the PATH, it'll make life much easier for you.
- Python 2.7 - Windows, macOS
- Windows developers: Let Python install into the default suggested path
(
c:\Python27
), otherwise you'll have to configure node-gyp manually with the path which is annoying.
- Windows developers: Let Python install into the default suggested path
(
- macOS: Xcode and Xcode Command Line Tools (Xcode -> Preferences -> Downloads)
- Windows: Visual Studio 2015 or Visual C++ Build Tools
- Run
npm config set msvs_version 2015
after installing the build tools. - Visual Studio 2017 support has not been tested yet - waiting on
node-gyp
support to be generally available.
- Run
With these things installed, open a shell and validate you have access to these commands and that the versions look similar:
> node -v
v7.8.0
> npm -v
4.2.0
> python --version
Python 2.7.13
We also have some additional resources to help configure your favourite editor to work nicely with the GitHub Desktop repository.
After cloning the repository, the typical workflow to get the app up and running is as follows:
- Run
npm install
to get all required dependencies on your machine. - Run
npm run build:dev
to make a development build of the app. - Run
npm start
to launch the application. Changes will be compiled in the background. The app can then be reloaded to see the changes (Ctrl/Command+R).
If you've made changes in the main-process folder you need to run npm run rebuild:dev
and then npm run start
for these changes to be reflected.
If you're still encountering issues with building, refer to our troubleshooting guide for more common problems.
npm test
- Runs all unit and integration testsnpm run test:unit
- Runs all unit testsnpm run test:integration
- Runs all integration tests
Pro Tip: If you're only interested in the results of a single test and don't wish to run the entire test suite to see it you can pass along a search string in order to only run the tests that match that string.
npm run test:unit -- --grep CloneProgressParser
This example will run all tests matching CloneProgressParser
.
Electron ships with Chrome Dev Tools to assist with debugging, profiling and other measurement tools.
- Run the command
npm start
to launch the app - 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()
You're almost there! Here's a couple of things we recommend you read next:
- Up for Grabs - we've marked some tasks in the backlog that are ideal for external contributors
- Code Reviews - some notes on how the team does code reviews