Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Developer Hints

Christian Zirkelbach edited this page Feb 17, 2020 · 31 revisions

Development Process

Github

Currently, we are working on two major branches for the backend and frontend repository.

  • master: contains the latest stable, but proably not released yet version (Release Candidate)
  • dev-1: contains the latest development version

Additionally, we work with feature-based, issue-related, or individual developer-branches, which are merged into the dev-1 branch via a reviewed pull request.

Icons

For icons in menus we employ Octicons.

Ember.js and Node.js

Introduction

During development, you will probably encounter different issues with Ember.js or Node.js. These will ultimately suspend your development.

Therefore, this wiki entry is supposed to gather common problems and workarounds. We encourage you to add unknown problems to the list.

Do not use Ember's function prototype extensions

https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-function-prototype-extensions.md

Escaping html in string

Using triple-staches {{{string}}} in templates escapes html and allows to use emphasis in text when rendered .

File watch limit is exhausted

If you encounter an error such as

Build Error (WatchedDir)
watch /home/akr/git/explorviz/explorviz-frontend/public ENOSPC 

or something similar, try to increase the monitoring limit for all files inside a directory with

echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p

More details can be seen here.

three.js

Git

Create a branch in Git from another branch and merge back

  1. Create "newBranch" branch off "sourceBranch"
  • $ git checkout -b newBranch sourceBranch
  1. Make changes in your branch "newBranch"
  2. Commit changes to branch "newBranch"
  • $ git commit -am "Your message"
  1. Merge your changes in "newBranch" to "sourceBranch" without a fast-forward
  • $ git checkout sourceBranch
  • $ git merge --no-ff newBranch
  1. Push changes to the server
  • $ git push origin sourceBranch
  • $ git push origin newBranch

Remove local and remote branch (on origin)

git push -d origin <branch_name>

Remove cached remote branches which were deleted on origin

git fetch --prune

Add specific commit to existing git tag

Link

Docker

Remove all containers, images, and volumes

#!/bin/bash
# Show all (exited / running) ExplorViz containers
docker ps -a -f name=explorviz*

# Delete all (ATTENTION) containers
docker rm $(docker ps -a -q)

# Delete all ExplorViz images
docker rmi -f $(docker images "explorviz/*" -q)

# Delete all (ATTENTION) images
docker rmi $(docker images -q)

# Delete all ExplorViz volumes
docker volume rm $(docker volume ls -f "name=explorviz" -q)

# Delete all (ATTENTION) volumes
docker volume prune -f

MongoDB Compass

  1. Download and install the MongoDB GUI Interface for macOS, Windows, or Linux
  2. Start the tool
  3. Change host settings if necessary, e.g., port 27018 for landscape DB
  4. Hit Connect and inspect the MongoDB instance and its saved documents

TypeScript

A good Getting Started can be found here.

Ember Octane

For a detailed overview on what changes and features are introduced with the Octane Edition of Ember, see this guide.

For a more compact overview, take a look at this cheat sheet.