Setting up

Setting up

This page explains how to set up your development environment to start contributing to MarkBind.

Prerequisites

  1. Node.js ( or higher) with
    a recent version of npm

  2. Java 8 or higher, and
    Graphviz ( or higher, installation is optional on Windows)
    (The above two are required for one of the third-party libraries used by MarkBind)

  3. Python 3 or later, and
    (Required if using python pre-commit hooks)

  4. Verify that all tools are accessible and the versions are as expected by running these commands in the console.

    • node --version
    • npm --version
    • java --version
    • dot -V (for Graphviz - optional on Windows)
    • python3 -V

We recommend the WebStorm IDE or VS Code for working with MarkBind code.

Setting up the dev environment

  1. Fork and clone the MarkBind repo.

  2. Bind your cloned version of MarkBind to your console by navigating to the cloned packages/cli folder and running npm link

  3. Install dependencies by running in the root folder of your cloned repo.

  4. Congratulations! Now you are ready to start modifying MarkBind code.

There are a few Git hooks implemented using the pre-commit tool that runs common tasks like linting, automated tests and compiling typescript files.

Install the hooks by running python3 ./pre-commit/pre-commit-2.20.0.pyz install in the root folder of your cloned repo.

If you ever need to uninstall the hooks, simply run uninstall instead of install.

Common setup questions

  1. Does MarkBind work with all operating systems?

    Yes! We support all operating systems.

  2. How does MarkBind manage dependencies?

    MarkBind uses lerna, a popular multi-package development tool, to manage its dependencies. It is essentially a high level wrapper over node and npm's functionalities.

  3. How do I move back to the released version of MarkBind?

    To go back to the released version of MarkBind, run npm un -g markbind-cli, followed by npm i -g markbind-cli.

  4. Some of my front-end components are not working as expected when running markbind serve.

    Try running either markbind serve -d or npm run build:web to view frontend changes (especially after pulling a frontend update that someone else may have pushed). You can see more details here.