This is a guide to setting up a development environment for the Minnesota Pollinators projects, aimed at new students. You may already have some of the necessary programs installed—if so, you can just skip those steps!
This document draws from prior writeups by Paul Friederichsen and Prof. Nic McPhee.
Table of Contents
- Creating a GitHub Account
- Installing Visual Studio Code
- Installing
git
- Installing GitKraken
- Installing Node.js
All of the code for Minnesota Pollinators—along with its revision history—is stored on GitHub, a website for hosting software projects. To work on Minnesota Pollinators, you'll need to sign up for a GitHub account here.
You'll want to join the Minnesota Pollinators organization (Prof. KK Lamberty can invite you).
If you're a student at Morris, be sure to sign up for the GitHub Student Developer Pack as well!
Next, in order to read and write the code, you're going to need a text editor. There are a lot of good options, but the one that we've been using is Visual Studio Code, particularly because of its Live Share feature.
When you open Visual Studio Code for the first time, you might get a pop-up in the bottom-right corner asking if you'd like to install the recommended extensions for this workspace. These are things like better autocomplete, spell checking, and warning messages—go ahead and install them.
git
is a version-control system: it keeps track of all of the changes made to the project, and lets several people work on the same code in parallel.
If you're on Windows, you can go here to download git
.
When the installer asks you to choose the default editor, you may want to select Visual Studio Code. Other than that, the default options should be just fine.
If you're on a Mac, you can get git
as part of the Xcode command-line developer tools. Open up Terminal and type git --version
:
You'll get a pop-up asking you to install the developer tools:
If you don't get a pop-up, but instead get a version number like this, that means git
is already installed.
git
by itself is very spare, so we've been using it through a program called GitKraken. (This program has a nice chart showing all of the revisions over time.) You can use GitKraken for free, but if you're a Morris student, you have access to the pro version through the GitHub Student Developer Pack.
Once you've installed GitKraken, you're going to want to download the Minnesota Pollinators code onto your computer. To do this, click the "Clone a repo" button on the left side of GitKraken, and type in the git
URL for the project.
(You can find the git
URL of any repository by going to that repository's page on GitHub and looking under the "Code" dropdown. Here's the git
URL for Buzz About:)
Now, you should be able to see the whole history of the project!
Generally speaking, you will want to create a branch for any feature or change you wish to contribute, and then make a pull request in GitHub when you think it is ready for review to be added to the main branch in the repository. You can check out any branch locally using GitKraken by double-clicking it.
At this point, you should have all of the code for a repository on your computer, but you still don't have a way to compile and run it. For that, you'll need to install Node.js, a JavaScript runtime.
You can download Node.js, along with its associated command-line tools, here. The LTS (long-term support) version should be fine.
On Windows, you'll be asked if you want to install tools for native modules. We don't have any native modules in this project, but you'll probably want to check that box anyway, in case you want to install any in the future. (Installing tools for native modules may take a while.)