Dev

Gotchas

Cleaning up artifacts

Compiled javascript doesn't get deleted from plugin-core/out which means that deleting a typescript file won't remove it from the compiled javascript. If you are seeing an error that you can't explain, try deleting the out folder by running the following command

cd packages/plugin-core
rm -rf out
yarn compile

Tips

Regular Workflow

  1. Checkout a feature branch for your task
  2. Work on code
  3. Submit a pull Request

Getting Help

Dendron is actively being developed and it could be quite confusing to start developing for the first time. In this case, we recommend asking for help with whatever blockers you might have with setting up or understanding part of the codebase.

Generally, a member of the Dendron team or the community will chime in for help if you post a specific question in the #dev channel in our Discord server.

For more information, check out our handbook entry on Getting help for development described here

Advanced

Working with the API Server

Dendron connects to a local express server which is responsible for indexing your notes. This express server also serves up static files generated by Dendron Next Server.

Dendron compiles the static assets from the next server to the express server during publication so that everything is bundled when published. When you are developing, you can launch the next server independently for faster development. You can follow the instructions here to start the next-server.

To start Dendron with the next server active, you can set the following value in dendron.yml

dev:
  nextServerUrl: "http://localhost:3000"

Working with the CLI

Symlink dendron

cd packages/dendorn-cli
npm link

npm link -g @dendronhq/dendron-cli

Working with Verdaccio

Verdaccio is an open source local NPM registry. We use it to test out publishing and link together projects internally before publishing

  • NOTE: only run verdaccio when you need to test publishing. otherwise, this will pollute the yarn.lock file with localhost entries which will fail in CI/CD



Children

  1. Cook
  2. Trouble