- Setting up the primo development environment
- Local development
- Making changes to a custom package
- Running tests
- Packaging your customizations
# ~/Projects
git clone [email protected]:BCLibraries/primo-explore-devenv.git
- node v.10.x
- 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.exlibrisgroup.com:443';
Development will be easier if you download into the parent directory and name the local repo 01BC_INST-bclib, after the view name
# ~/Projects
git clone [email protected]:BCLibraries/bc-primo-customizations.git 01BC_INST-bclib
# ~/Projects/01BC_INST-bclib
npm install
# ~/Projects/01BC_INST-bclib
ln -s ~/Projects/01BC_INST-bclib ~/Projects/primo-explore-devenv/primo-explore/custom/
# ~/Projects/primo-explore-devenv
gulp run --view 01BC_INST-bclib --ve
Visit http://localhost:8003/discovery/search?vid=01BC_INST:bclib in your browser.
Note that the view in the URL uses a colon, while the customization folder uses a hyphen.
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 [email protected]:BCLibraries/primo-explore-bc-availability.git
# ~/Projects/primo-explore-bc-availability
sudo npm link
# ~/Projects/01BC_INST-bclib
rm -rf node_modules/primo-explore-bc-availability
npm link primo-explore-bc-availability
# ~/Projects/primo-explore-bc-availability
gulp run-tests --view 01BC_INST-bclib --ve
# ~/Projects/01BC_INST-bclib
rm -rf node_modules/primo-explore-bc-availability
npm install
# ~/Projects/primo-explore-devenv
gulp create-package --view 01BC_INST-bclib --ve
# ~/Projects/primo-explore-devenv/packages/01BC_INST-bclib.zip
- In Alma, navigate to Configuration > Discovery > Display Configuration > Configure Views
- Choose Edit from the action menu (three dots) and then select the Manage Customization Package tab
- Download the Current View Customization Package of 01BC_INST-bclib.zip as a backup
- Upload the new version of 01BC_INST-bclib.zip
- Press the Save button in the upper right to deploy