bibblio-related-content-module-source v4.10.0
Build and testing tools for "related content module"
Setup
Start by installing the NPM dependencies for this code base:
npm config set dev true
npm install
The files you are likely to work on are in the "public" folder, and instructions for updating the module in Bower and npm will be given when you build (see below).
Using Docker
docker-compose up -d
If you need to debug the browser you can VNC into the browser using localhost:5900
- the password is secret
.
Testing
To run tests, start the selenium docker image and run the tests:
docker-compose exec rcm npm test
(or see "test/integration/bin/README.txt" for instructions on running Selenium locally)
Building
To bump version number, deploy to NPM/Bower/CDN and tag branchs, run:
npm run-script build
Follow the prompts which will request the new version number and confirm copying public files to the dist folder.
Bibblio objects
Bibblio
The bibblio object defines the functions that are involved in the pipeline of our module. The module pipeline is (at the moment) defined as:
-> initialise module
-> get related content items
-> handle auto ingestion
-> create scrape request
-> handle created scrape request
-> render module
-> initialise tracking
BibblioUtil
The util object contains all the functions that are not part of the pipeline. It is categorised according to the pipeline function and it also has a common
category. Categories are separated with comments using ///
.
BibblioTemplates
Defines the html templates and template functions.
BibblioEvents
Defines the events involved in the related content module (E.g. viewed and clicked).
BibblioActivity
Creates the activity requests and constructs the bodies of each activity request.
5 years ago