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.sh
All files that are included in the build are found under src/
. The directory is organized by object property. Examples:
Pride.init
is found insrc/Pride/init.js
Pride.Util
is found insrc/Pride/Util/index.js
Pride.Util.escape
is 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 test
The 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.json
file. Edit the dependency URL forpride
to point to your localpride
repository.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.