Skip to content

Getting Started

Michael Flucher edited this page Jun 30, 2021 · 4 revisions

You need the following packages installed:

  • python3
    • on windows recommended via Microsoft Store, so python3 command is already registered
  • nodejs with npm
  • git
  • A IDE such as VSCode or WebStorm

Steps to start the Project

  1. Fork the Repository and clone it
  2. Be sure to have yarn installed by running npm i -g yarn
  3. Navigate to the cloned Repository and run yarn install
  4. After the node_modules folder is created, you can run several scripts, which are listed in package.json

Scripts to run

Most time, script names end with :dev or :build.

:dev is always for a live server, which doesn't produce files on hdd and hot reload after saveing source files. We use this scripts for developing most of the time.

:build produces a ready to serve folder /build in the project structure. If you navigate to this folder, you can run a web server (f.e. `python3 -m http.server) and inspect the generated website.

yarn translate

Executed as dependency before every other script, which produces a website. It creates the i18n for our Blocks from the given Androind translations.

yarn playground:dev

Creates a website with a replica of the Google Playground.

yarn render:dev

Creates the local developtment version of te Catblocks Renderpage. On every merge yarn render:build is executed and deployed to the given link.

yarn release:dev

Creates the sample page which is used to develop and test the CatBlocks library. With yarn release:build the /release folder is generated. This folder gets deployed to share.

yarn test

Runs our automatic tests to be sure code changes don't break anything. Main focus is that they work on linux, as they are executed in a linux container on every Pull Request.

yarn lint

Checks your code formatting and errors. To run autofix, you can use yarn lint:fix, but sometimes you have to fix errors manually. If you don't execute it before you create a Pull Request you might not pass the code checks.

Clone this wiki locally