Skip to content

Development Guidelines

Michael Jonker edited this page Aug 24, 2022 · 1 revision

Thank you for giving time to help develop typedoc-plugin-hot-dev.

Code format standards

Code formatting is enforced using Prettier.
This will need to be correct for tests to pass. For instructions on integrating Prettier code formatting into your IDE, please refer to their documentation.

To auto format your code in this project, run prettier -w . from the root folder of the project (note the "." at the end of the command).

Testing and building

All tests are in the test directory.
Tests are built using Mocha and Chai. They can be run with npm test.
Coverage is measured with Instanbul.

To build, run npm run build.
All required build files are built into the dist folder.

Local dev install

You may want to install a local dev version of "typedoc-plugin-hot-dev" into a theme project.
This can get a bit tricky because of "typedoc" itself being a peerDependency, and npm link not playing nice with peerDependencies.

A way to work around this is as follows:

  • From your dev plugin folder, install the parent typedoc: npm i -D ../path/to/your/theme/node_modules/typedoc
  • Build your dev plugin into the "dist" folder: npm run build
  • From your theme project root, install your dev plugin from file: npm i -D ../path/to/typedoc-plugin-hot-dev/dist
Clone this wiki locally