Pride is a JavaScript library that handles all communication between the University of Michigan Library Search's front-end application and the backend.
Run the init.sh script.
./init.shAll files that are included in the build are found under src/. The directory is organized by object property. Examples:
Pride.initis found insrc/Pride/init.jsPride.Utilis found insrc/Pride/Util/index.jsPride.Util.escapeis found insrc/Pride/Util/escape.js
The pride.min.js build is used for applications that include pride. The pride.js build is used for testing.
npm run testThe organization of the spec/ directory mirrors the src/ directory. Each test file ends in .spec.js.
- Clone mlibrary/search.
gh repo clone mlibrary/search
- Navigate to the repository and open the
package.jsonfile. Edit the dependency URL forprideto point to your localpriderepository.Note: If you want to test a specific branch, add"pride": "file:../pride",
#followed by the branch name to the end of the URL."pride": "git+https://github.com/mlibrary/pride.git#your-branch-here",
- Install
Note: If this is not a fresh clone, do a clean install.
npm install
rm -rf node_modules && package-lock.json && npm install
- Run locally
npm start
While Search is running locally, the site will automatically refresh whenever pride.min.js changes.