Giter VIP home page Giter VIP logo

bc-primo-customizations's Introduction

BC Primo Customizations

Setting up the primo development environment

Download the Primo Development Environment

# ~/Projects
git clone [email protected]:BCLibraries/primo-explore-devenv.git

Install dependencies

Install node modules

# ~/Projects/primo-explore-devenv
npm install

Configure the proxy server

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';

Download BC Primo Customizations

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 [email protected]:BCLibraries/bc-primo-customizations.git bclib_new

Install BC Primo Customization packages

# ~/Projects/bclib_new
npm install

Link BC Primo Customizations to custom view location

# ~/Projects/bclib_new
ln -s ~/Projects/bclib_new ~/Projects/primo-explore-devenv/primo-explore/custom/

Local development

Run a local development server

# ~/Projects/primo-explore-devenv
gulp run --view bclib_new

Viewing the local development instance of Primo

Visit http://localhost:8003/primo-explore/search?vid=bclib_new in your browser.

Making changes to the view

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.

Making changes to a custom package

Download the package

# ~/Projects
git clone [email protected]:BCLibraries/primo-explore-bc-availability.git

Link to the development environment

# ~/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

Running tests

Run tests

# ~/Projects/primo-explore-bc-availability
gulp run-tests --view bclib_new

Packaging your customizations

Switch customized packages to remote version

# ~/Projects/bclib_new
rm -rf node_modules/primo-explore-bc-availability
npm install 

Create the package

# ~/Projects/primo-explore-devenv
gulp create-package --view bclib_new
# ~/Projects/primo-explore-devenv/packages/bclib_new.zip

Upload and deploy the package

Visit the Primo Backoffice and navigate to Deploy & Utilities > Customization Manager

  1. Choose bclib_new from the dropdown
  2. Download the current version of bclib_new.zip as a backup in case something goes wrong
  3. Upload the new version of bclib_new.zip
  4. Deploy

screenshot of steps to upload and deploy the package

bc-primo-customizations's People

Contributors

colfords avatar lukegaudreau avatar noamaexl avatar shoulm avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.