We use some ES6+ language constructs in our build scripts so you need Node.js 6+ (just pick whatever the 'current' release is at the moment). Node 6 comes with npm 3 out of the box and while npm 3 isn't strictly necessary to build it does make things more efficient, especially on Windows where deep folder hierarchies can be detrimental to build speed.
Windows only: Make sure you allow the Node.js installer to add node to the PATH, it'll make life much easier for you. Also, make sure you're on NPM 3.10.4 or higher. You can check via npm -v
. If not, run npm install -g npm
node-gyp is required to build some of our native npm packages (such as keytar)
- Install python 2.7 (Windows, macOS)
- 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
- Run
Windows only: Let python install into the default suggested path (c:\Python27
), don't try to move it into Program Files or else you'll have to configure node-gyp manually with the path.
- Download the
developer-id-cert.p12
and then open it. - Ask a member of the Desktop team for the password.
- Add it to your Keychain.
- 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. After it's successfully launched you can make changes which will be compiled in the background and these changes will either be hot-loaded into the app (if possible) or accessed by reloading the app (Ctrl/Command+R).
If you're using Atom there's some plugins that you might want to install
- atom-typescript - Syntax highlighting and intellisense for TypeScript
- atom-build-npm-apm - Lets you invoke all npm scripts straight from the editor by pressing F7 (requires atom-build)
- linter and linter-tslint - Shows linter errors and warning in the editor
Atom-typescript doesn't support TS 2.0 out of the box right now so you have to manually specify the path to typescriptServices.js.
Start by installing Typescript 2.0 globally
npm install -g typescript@next
Then switch to atom and follow these steps
- Open Settings
- Go to Packages
- Locate the atom-typescript package and select settings
- Under settings, locate the textbox with the label 'Full path to a custom 'typescriptServices.js'
- Provide the path
- For Mac:
/usr/local/lib/node_modules/typescript/lib/typescriptServices.js
- For Windows:
C:\Users\[YOUR USERNAME]\AppData\Roaming\npm\node_modules\typescript\lib\typescriptServices.js