Setup¶
This document holds instructions on the development setup.
Node.js¶
We use Node.js version 18.15.0
.
To install node, use nvm or nvm-windows.
Yarn¶
We use Yarn 2 (Modern). Install it as follows.
Tasks¶
We use ./task
as build tool.
Using Tasks¶
Execute a task as follows. On Windows, execute it using, e.g., Git Bash.
Get an overview of tasks as follows.
Get help for a specific task as follows.
Writing Tasks¶
Tasks can be written in Bash, Typescript, and Python and are located in ./tasks/some/command/task{.sh,.ts,.py}
.
The following environment variables are available.
Environment | Description |
---|---|
TASK_BINARY | The absolute path of ./task . |
TASK_ROOT_DIR | The absolute path of the root directory of the project. |
TASK_TASK_DIR | The absolute path of the directory in which the task is located. |
Some hints:
- There is no need to include
#!/usr/bin/bash
orset -e
in Bash tasks. - Bash tasks are executed from
TASK_ROOT_DIR
. - To add a summary, place a single line in
${TASK_TASK_DIR}/summary
. - To add a help text for a task, place the text in
${TASK_TASK_DIR}/help
. - Always add a new line at the end of every file.
Repository¶
The repository is a monorepo consisting of the CLI, server, docs, tests, etc. Clone it as follows.
Large Files¶
Larges files, such as binaries or archives used in examples, are added using git lfs.
This includes the file extensions .bin
, .gz
, .tar
, .zip
, .xz
, and .jar
.
Signed Commits¶
Commits are required to be signed. Therefore, register a signing key as follows.
- Generating a new GPG key
- Adding a GPG key to your GitHub account
- Telling Git About Your Signing Key
- Signing Commits
Enable auto-signing inside the repository.
JetBrains¶
Warning
WebStorm Version 2022.3.3 seems to have problems with breakpoints when src/resolver/graph.ts
is involved.
However, WebStorm Version 2022.3.2 works fine.
We use WebStorm, which is free for students. Install Webstorm using JetBrains Toolbox.
ESLint¶
Open the Project Settings using Ctrl + Alt + S
.
ESLint should be configured as given in the figure below with the following pattern.
Prettier¶
Open the Project Settings using Ctrl + Alt + S
.
Prettier should be configured as given in the figure below with the following pattern.
Excluded Directories¶
The following directories should be excluded from search by the IDE.
.nyc_output
docs/.venv
build
build-tasks
coverage
yarn
dist
dist-docs
node_modules