- Setting up the primo development environment
- Local development
- Making changes to a custom package
- Running tests
- Packaging your customizations
# ~/Projects
git clone git@github.com:BCLibraries/primo-explore-devenv.git
- node version 16.17.0
- npm
- gulp
# ~/Projects/primo-explore-devenv
npm install
The local development environment connects to our production or staging instance of Primo via proxy.
// primo-explore-devenv/gulp/config.js
var PROXY_SERVER = 'https://bc-primo.hosted.exlibrisgroup.com:443';
Development will be easier if you download into the parent directory and name the local repo bclib_new, after the repo name
# ~/Projects
git clone git@github.com:BCLibraries/bc-primo-customizations.git bclib_new
# ~/Projects/bclib_new
npm install
# ~/Projects/bclib_new
ln -s ~/Projects/bclib_new ~/Projects/primo-explore-devenv/primo-explore/custom/
# ~/Projects/primo-explore-devenv
gulp run --view bclib_new
Visit http://localhost:8003/primo-explore/search?vid=bclib_new in your browser.
Basic styles and templates can be changed in bc-primo-customizations
. Customization that changes or adds functionality is contained in separate packages. A feature can be added or removed by editing js/aaa_bootstrap.js and installing or removing the npm package.
# ~/Projects
git clone git@github.com:BCLibraries/primo-explore-bc-availability.git
# ~/Projects/primo-explore-bc-availability
sudo npm link
# ~/Projects/bclib_new
rm -rf node_modules/primo-explore-bc-availability
npm link primo-explore-bc-availability
# ~/Projects/primo-explore-bc-availability
gulp run-tests --view bclib_new
# ~/Projects/bclib_new
rm -rf node_modules/primo-explore-bc-availability
npm install
# ~/Projects/primo-explore-devenv
gulp create-package --view bclib_new
# ~/Projects/primo-explore-devenv/packages/bclib_new.zip
Visit the Primo Backoffice and navigate to Deploy & Utilities > Customization Manager
- Choose bclib_new from the dropdown
- Download the current version of bclib_new.zip as a backup in case something goes wrong
- Upload the new version of bclib_new.zip
- Deploy