Install Development Tools - theRAPTLab/gsgo GitHub Wiki
tested on Intel MacOS Mojave, Catalina, and clean Big Sur Intel.
tested on Apple Silicon MacOS Monterey clean
GEM-STEP is a collection of server and client code packages developed in Javascript. The system is implemented using NodeJS for the servers and HTML5 running in the browser. If you are familiar with Javascript development using a command line interface, then you will find these tools familiar. If not, we've tried to make the installation process as simple as possible.
If you are installing on a clean MacOS Mojave or later system, you'll need to do some initial setup. After this, you shouldn't have to do it again.
This adds a bunch of Unix-y command line utilities and program compilation tools.
- open Terminal app
- enter
xcode-select --install
(accept dialog box, then wait for install to complete)
You may be asked to accept the xcode license agreement. Just type the command and press space a bunch of times until you can type "agree"
- enter
cd ~; mkdir dev
(creates a 'dev' directory in your user folder) - enter
cd ~/dev
- enter
git clone https://github.com/theRAPTLab/gsgo.git
- enter
cd gsgo
To install NodeJS, we are going to use the Node Version Manager (nvm). This will allow us to set which version of NodeJS we want to use on a per-directory basis. Quick install:
- open Terminal
- if you are on MacOS Catalina or later, type
touch .zshrc
. If you are on an earlier version, typetouch .bash_profile
- go to
https://github.com/nvm-sh/nvm
- copy the
curl
script string from the README, and execute it in the command line - close terminal window, and reopen it...this will load the modified shell environment.
At this point, NodeJS is installed, which also installs the Node Package Manager (npm) which you will use to install and build packages. You can confirm NodeJS is installed by typing node --version
into the terminal. You may also recover some disk space with nvm cache clear
NOTES on NVM USE
- You can specify a node version by name, for example
nvm use lts/fermium
will load the latest version of the "long term service Fermium" branch. -
nvm current
will show you which version of NodeJS is active - Apple Silicon requires Node v14 or higher
- If you get a zsh: npm command not found error, type
nvm alias default v14.18.1
(substitute whatever version of node you like; this will be the one that is made available if no valid.nvmrc
is found
If you are planning to edit any source files in GEM-STEP, then you should also install Visual Studio Code (VSCode). This is our official code editor that supports our development requirements, and is available on all major platforms. This ensures consistent code formatting rules, pretty print, and provides live linting to help identify errors.
After you've installed VSCode, use the FILE menu to open the workspace named gsgo/gsgo.code-workspace
. This workspace has project-specific settings in it. After you open the workspace, you should use this for all future editing within the project.
The first time you open the gsgo workspace, you will be prompted on what RECOMMENDED EXTENSIONS to install. You will have to install these manually by going to the EXTENSIONS tab on the left-side vertical panel.
For more information about what these extensions are doing, see 20-tooling/20-vscode-qol.md.
At this point you can run our install script to set everything up. This script detect what version of a (supported) operating system you're running, and then emits the commands for you to type. Copy and paste them into the terminal window.
- enter
./scripts/install-helper.sh
- read the output to see what to do!
Your development environment should be all set up and you can now run the application. However, the application itself needs set up as well.
After you've installed the development environment, follow the guide in Daily Operations. It covers running, updating, and switching different development branches.