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/recogito-client-core. A base module that contains most of the code for RecogitoJS, and all code that is shared between RecogitoJS and Annotorious. You’ll need this module if you want to hack anything about RecogitoJS (text selection, relationship drawing) or the common editor popup.
- recogito/annotorious. The Annotorious application entry point. Also implements SVG rendering and shape drawing.
- recogito/annotorious-openseadragon. The OpenSeadragon plugin. Imports most functionality from recogito-client-core and annotorious.
Running in Development Mode
To hack on RecogitoJS, Annotorious, or the OpenSeadragon plugin, 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 RecogitoJS, Annotorious, or the OpenSeadragon plugin, 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