Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 3.31 KB

getting-started.md

File metadata and controls

60 lines (38 loc) · 3.31 KB

Getting started

Prerequisites

Node.js

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

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

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.

Certificates

macOS

  1. Download the developer-id-cert.p12 and then open it.
  2. Ask a member of the Desktop team for the password.
  3. Add it to your Keychain.

Building

  • 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).

Using Atom?

If you're using Atom there's some plugins that you might want to install

Using Atom with Typescript 2.0

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

  1. Open Settings
  2. Go to Packages
  3. Locate the atom-typescript package and select settings
  4. Under settings, locate the textbox with the label 'Full path to a custom 'typescriptServices.js'
  5. 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