Hacker’s Guide to Annotorious and RecogitoJS
We welcome pull requests to Annotorious and RecogitoJS - both to the code, as well as to our documentation! To contribute, simply fork the relevant repository and hack away. Our code is located in the following repositories
- recogito/annotorious. Annotorious application entry point, SVG rendering and drawing tool base classes.
- recogito/annotorious-openseadragon. The OpenSeadragon plugin. Imports most functionality from annotorious and recogito-client-core.
- recogito/recogito-client-core. A base module that contains shared code for Annotorious and RecogitoJS, most importantly the code for the editor popup.
- recogito/recogito-js. RecogitoJS application entry point, text annotation functionality.
Running in Development Mode
To hack on Annotorious, the OpenSeadragon plugin or RecogitoJS, you need to run them in development mode.
- Clone the repository
npm installto download project dependencies
npm startto launch the project in dev mode, with hot-reloading enabled
- If your browser doesn’t open automatically, go to http://localhost:3000/
Building a distribution bundle
npm run buildto build a distribution bundle
- The distribution files will be in the
When working on Annotorious, the OpenSeadragon plugin or RecogitoJS, you may need to modify code in recogito-client-core, too. To do this, you have to set up your environment so that it points to your local copy of recogito-client-core, rather than the official package published on NPM. To make this work, you have to
npm linkyour local projects.
- Clone the recogito-client-core repository
npm installto install dependencies
- Link your local clone of recogito-client-core, so that changes you make to recogito-client-core are reflected in your RecogitoJS/Annotorious project
$ cd recogito-client-core $ npm install $ npm link # Creates a global symlink $ cd .. $ cd annotorious $ npm install $ npm link @recogito/recogito-client-core # Links to the global symlink # Annotorious now uses your local clone of recogito-client-core # instead of the latest published NPM package $ npm start # Same procedure for RecogitoJS if needed