Dendron Plugin Quickstart

Prerequisites

Before you begin, you need to make sure to have the following SDKs and tools:

  • Node.js >= 14
  • yarn
    • npm install -g yarn
  • lerna
    • npm install -g lerna
  • vscode or vscodium
    • while this is not required, it's highly recommended as the Dendron repo comes with documentation that is managed using Dendron

Setup Dendron (optional)

  • Download Dendron by following instructions here
  • After you have gone through the tutorial, proceed, to next steps
  • When you clone the repo, developer docs will be available inside of your repo workspace

Setup ESLint

All packages in the repo use a standard base configuration found at .eslintrc.js.

If you are using vscode, download and enable the eslint extension. If you are using another editor, make sure you have eslint enabled.

Setup Repo

  1. Clone repo

    git clone https://github.com/dendronhq/dendron.git
    cd dendron
    
  2. Install dependencies

    # install package root dependencies
    yarn
    
    # this should install all dependencies
    yarn setup
    # if the above script errors out, you can diagnose the issue and run the following scripts sequentially depending on where the error occurred
    yarn bootstrap:bootstrap # install package dependencies
    yarn bootstrap:build  # build package dependencies
    
  3. Watch all dependencies

  • NOTE: typescript is a compiled language which means that the executable won't be updated unless you compile. The watch script will auto-compile all code on change
# watch all dependencies
./bootstrap/scripts/watch.sh

  1. Open the workspace by opening dendron-main.code-workspace with VSode. While its not required to use VSCode, most of the helper scripts in this repository are created with VSCode in mind so using it will make development significantly easier.

  2. Run the plugin

To start an instance of the Dendron with debugging capabilities, Run Extension: Local (plugin-core) from the debug panel in vscode

debugger

Note: Running via Run -> Start Debugging will not work unless you've previously targeted Extension: Local (plugin-core)

Note: To have the changes reflected as you edit the code you need to run the ./bootstrap/scripts/watch.sh and restart the Extension: Local (plugin-core))

Troubleshooting

Changes aren't showing up

  1. Typescript is a compiled language. Make sure that your code is being compiled. Make sure the following is on:
  # watch all dependencies
  ./bootstrap/scripts/watch.sh

Next Steps


Backlinks