Navigate sequences of images in a zoomable, extensible interface.
See the GitHub releases page.
Please see the wiki for instructions on how to customise the viewer for your own projects.
All command-line operations for building the Universal Viewer are scripted using Grunt which is based on Node.js. We are using Node for this project because it provides a powerful cross-platform collection of tools with minimal setup overhead. To get set up:
- Install Node.js, if you haven't already
- Install the Grunt command line interface (if you haven't already); on the command line, run
npm install -g grunt-cli
- Clone the 'UniversalViewer' repository:
git clone https://github.com/britishlibrary/UniversalViewer
- On the command line, go in to the 'UniversalViewer' folder
- Run
git submodule init
- Run
git submodule update
- Run
npm install
To build the debug version of the viewer, just run (on the command line, in the 'UniversalViewer' folder):
grunt
This will compile the .less files into .css and .ts files into .js with sourcemaps to aid in debugging.
To build the release version of the viewer, just run (on the command line, in the 'UniversalViewer' folder):
grunt build
The built files appear in the 'build' folder.
If you want to build tar and zip files for distribution (they will also appear in the 'build' folder), use:
grunt package
Note that the 'build' folder is masked with .gitignore; it's just for your local use, and won't be checked in to the repository.
To view the examples run:
grunt serve
The Universal Viewer is released under the MIT license. For details, see the file LICENSE.txt.