Requisites

You need updated version of node.js, npm and nvm:

Does not work with old version of nodejs (with version 4 does not work, with version 8 to 11 does)

Configuration of your IDE

In your IDE, need to install xo extension :

Visual Studio Code tricks

  • Using Visual Studio Code in Ubuntu, the integrated terminal may not fully work (e.g. error 134 with npm run dev); Solution: File -> Preferences -> Settings -> Features -> Terminal -> Inherit Env

Compiling sources and launching the server

First you need to download sources from this github page. Copy the folder on your machine.
Go inside the application folder and open a terminal, execute the following lines, one by one:

  • npm i (update nodejs)

  • npm run build (compile sources)

  • npm run dev (quick compile sources, launch server)

Then open in a browser this address http://localhost:3000.

Test each modification of the code with

  • npm run dev

Known errors

  • The instruction npm i may fail because of errors in the configuration of node or node packages. To solve the issue run npm audit and do what the results indicate.
  • The instruction npm run dev may fail with lots of errors. It may then be necessary to reinstall node dependencies. To do so remove the node_modules folder in the app folder (shriveling_world), and run again npm i, npm run build, and npm run dev
  • Sometimes the browser executes and old version of the code. In order to fresh start the client type CTRL+F5

Git tutorial

Create Branch with GitKraken

On the left of GitKraken window, right-click on master, select Create branch here, and then write a name for the branch (in the example the branch will be named TestDataSet).

Test a Pull Request before merging

  1. In GitHub find the ID number of the PR after the PR's title and the '#'
  2. In terminal execute 'git fetch origin pull/ID/head:BRANCHNAME'
  3. This 'BRANCHNAME' is the code proposed in the PR

Merge branch into distant Master

Once all changes are considered worth being pushed to master, stage and commit changes to the branch.

  1. Before merging it is necessary to include in the local master and in the branch the recent changes to the distant master. This is done by the instruction pull rebase. On the left of GitKraken window:

    • select the branch master and do a pull rebase
    • right click on the branch TestDataSet and run Rebase master on TestDataSet. Conflicts may have to be resolved.
  2. Then in the branch in the upper left window of GitKraken, right click and, Merge TestDataSet into master will introduce changes of the branch into the local master.

  3. Finally push the modifications to the distant master.

Alternatively: Start a pull request to origin from origin/TestDataSet