Develop Apache Annotator

Install from source

This project’s source code is available directly from the ASF or via GitHub.

Requirements

If you’d like to code on the project, you will need the following:

  • git
  • node version ^12.20 || ^14.15 || ^15.4 || ^16.0
  • yarn version ^1.5

Install

To retrieve the code using git:

$ git clone https://gitbox.apache.org/repos/asf/incubator-annotator.git apache-annotator

Then install dependencies using yarn:

$ cd apache-annotator
$ yarn install

Build

To compile (‘transpile’) the code:

$ yarn build

For each module, the TypeScript source code is in packages/…/src and the Javascript is output in packages/…/lib.

To use your local build of the code in an application that depends on annotator, have a look at the yarn link or npm link command.

Play

To run a webserver running the demo:

$ yarn start

Now open http://localhost:8080/ (or whichever address the command prints) in your web browser to play with the demo. The server continuously rebuilds and hot-reloads to the source code after any edits, so you can directly try out any changes you make to the features it demonstrates.

Run tests

This runs the tests for all packages and reports their code coverage:

$ yarn test