• Stars
    star
    114
  • Rank 308,031 (Top 7 %)
  • Language
    JavaScript
  • License
    BSD 3-Clause "New...
  • Created over 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A node.js , gulp based development enviornment for Primo's new UI customizations (css,images,html and javascript)

The Primo New UI Customization Workflow Development Environment

Structure

  • gulp directory : holds the various build scripts for the environment and the config.js configuration file in which your target proxy-server must be defined.

  • node_modules directory : holds the various third-party modules that are required to run the system. These modules are defined in the package.json file.

  • packages directory : once your development package is ready you will be able to build it using the gulp create-package command that will create the zipped package file you define in this folder

  • primo-explore directory : consists of 2 directories :

    1. custom : - where you will place your customization packages
    2. tmp : just a place to hold some of your temporary files

Overview

The development package allows you to configure the following page components (follow the links for details):

For each configuration-type, or for every different Primo View, there should be a specified folder named after the View (which adheres to the established directory structure) in the primo-explore/custom package folder.

This custom View folder can be downloaded from your Primo Back Office, by following Primo Home > Primo Utilities > UI customization Package Manager, or started fresh from the primo-explore-package GitHub repository. (The benefit of using this repository is that in each folder you will find a specific README.md file containing recipes and examples.)

Installation

Note: If you are not the Administrator of your machine, you might get into problems in the flow below, we recommend using the "Node.js command prompt (search for cmd in your pc to locate it) whenever the instructions below refer to "command line".

  1. Download the project from this repository and place it on your computer

  2. Unzip the file you downloaded to a preferred development project folder location

  3. Download and install the Node version 16.17.0

  4. Restart your computer

  5. From command line, run the command : npm install -g gulp

  6. In a new command line window, navigate to the project base directory (cd \path\to\your\project\folder\primo-explore-devenv)

  7. From command line, run the command : npm install (This should install all node modules needed for gulp.)

    npm install image

  8. Edit Gulp configuration file's proxy server setting, found at gulp/config.js : var PROXY_SERVER = http://your-server:your-port (Make sure to use your real Sandbox or Production Primo Front-End URL.) Note that for SSL environments (HTTPS) define the server as: var PROXY_SERVER = https://your-server:443

  9. Populate your custom View package folder in the custom package folder ("...primo-explore\custom"), by either downloading the view code files from your Primo Back Office or using the primo-explore-package GitHub repository) to start a new package folder. (if you have already defined a view package and loaded it to the BO - make sure you download it or else you will not see, and may overwrite, your previous changes.)

    • If your custom view package folder were to be called "Auto1" then your development environment directory tree should look similar to this: Directory tree image

    • IMPORTANT: The name of your custom view package folder must match an existing view on the proxy server being referenced or the Gulp server will not function properly. For development from scratch, be sure to first create (or copy) a view using the Primo Back Office View Wizard; then you can accomplish your customizations locally using this document.

  10. Start your code customizations :

  • From command line, run the command : gulp run --view <the VIEW_CODE folder> (This will start your local server.)

    (For example, running gulp run --view Auto1 will start the environment taking the customizations from the Auto1 folder.)

    Server Startup Image

  • For Primo VE customers, add the --ve flag : gulp run --view <the VIEW_CODE folder> --ve

  • Open a browser and type in the following URL : localhost:8003/primo-explore/?vid=your-view-code (Example: http://localhost:8003/primo-explore/search?vid=Auto1)

  • For Primo VE customers open the following URL : localhost:8003/discovery/?vid=your-institution-code:your-view-code

  • Now you should be able to to your customizations with real searches and results, from your previously defined proxy-server. Note: once you start working with this environment, you will discover that the best results are achieved by working in your browser's incognito mode; or you can clear your browser cache before you start the Gulp server.

Env up Image

  • You can get immediate feedback on your code changes by refreshing the browser.

  • Perform your changes according to the documentation/examples in:

Note: you have multiple options to edit the css file(custom1.css) and the js file(custom.js), some of them include methods of splitting your developments to seperate files. When using such methods - the custom1.css and custom.js files will be overriden by the different files when gulp is run. Place your custom css and js into files with different names such as custommodule.css or custom.module.js to have it concactinated into the custom css/js files.

Publishing packages

Once you finish customizing the package, you can zip up that directory and upload it using the Primo BackOffice.

  1. In a command line window, navigate to the project base directory : cd \path\to\your\project\folder\primo-explore-devenv

  2. From command line, run the command : gulp create-package You will be prompted with a menu specifying all of the possible packages you can build, such as :

    Create Package Image

    Package Image

  3. Log into Primo Back Office and navigate to the UI customization Package manager section : Primo Home > Primo Utilities > UI customization Package Manager

  4. Use the file browse button to find and upload the new zipped package file. (Located in the "\path\to\your\project\folder\primo-explore-devenv\package" directory.)

    BO Image

  5. Don't forget to deploy your changes

Publishing Primo-Studio addons

Once you finish customizing the package, you can get it ready to be published to Primo-Studio.

  1. In a command line window, navigate to the project base directory : cd \path\to\your\project\folder\primo-explore-devenv

  2. From command line, run the command : gulp prepare-addon You will be prompted with a menu specifying all of the possible packages you can build.

  3. Once you finished running the script a folder containing the add-on will be created in \path\to\your\project\folder\primo-explore-devenv\addons.

  4. From the above folder you can publish your add-on to NPM and to Primo-Studio. For Instructions see: Primo-Studio add-on tutorial

More Repositories

1

primo-explore-package

The Template package for Primo new UI customizations
HTML
51
star
2

SpineOMatic

Spine label printing for Ex Libris' Alma
Visual Basic .NET
35
star
3

Primo.PNX-context

JSON LD context for Primo PNX documents
12
star
4

campusm-aek

campusM AEK Code Extensions
JavaScript
11
star
5

alma-print-daemon

Application which listens for and prints letters from the Ex Libris Alma print queues.
JavaScript
11
star
6

Primo-Studio

TypeScript
9
star
7

alma-refine

App to refine BIB records using OpenRefine services
TypeScript
7
star
8

Rosetta.dps-sdk-projects

Rosetta SDK projects
Java
6
star
9

exl-ezproxy-authenticator

EZproxy Authenticator for Alma
JavaScript
5
star
10

spineomatic-cloudapp

Cloud App version of SpineOMatic
TypeScript
5
star
11

Primo.Show-PNX-IDs-Bookmarklet

5
star
12

Discovery-Showcase

TypeScript
4
star
13

Alma.Converters

Converters for Alma integrations
PHP
4
star
14

ExlTableauWDC

Tableau Web Data Connector for Ex Libris Analytics
HTML
4
star
15

Rosetta.OAIPMH-Harvesting

Configuration for Rosetta OAI-PMH Harvesting from various sources
XSLT
3
star
16

Rosetta.JpylyzerMDExtractorPlugin

Jpylyzer technical metadata plugin
Java
3
star
17

primo-explore-linked-data-demo

Demo
JavaScript
3
star
18

alma-scheduler

Appointment scheduler app for Ex Libris Alma
TypeScript
3
star
19

alma-e-collection-quick-update

Quickly update E-Collections in Ex Libris Alma
HTML
2
star
20

Primo-Studio-Addon-Tutorial

JavaScript
2
star
21

Rosetta.RestApi

Java
2
star
22

Rosetta.DrmlintRiskExtractorPlugin

Java
2
star
23

wadl-doc

XSL files to produce documentation on WADL and XSD files
XSLT
2
star
24

Rosetta.RestApiLoaderApplication

Rosetta.RestApiLoaderApplication
Java
2
star
25

alma-hathitrust-availability

Ex Libris Cloud App which checks Hathitrust availability for records in Alma
TypeScript
2
star
26

alma-cantaloupe

Cantaloupe image server for Alma Digital
Ruby
2
star
27

Rosetta.S3StoragePlugin

Java
2
star
28

alma-receive-serials

App to efficiently receive new serials items in Ex Libris Alma
TypeScript
2
star
29

rosetta.IIPImageVPP

Rosetta IIPImage Viewer Pre-Processor Plugin
HTML
2
star
30

alma-csv-user-load

Load users to Ex Libris Alma from CSV files
TypeScript
2
star
31

campusm-tools

PHP
2
star
32

Exlibris.Rosetta.UpdateAIP

Tool to update existing AIPs in Ex Libris Rosetta
C#
2
star
33

rosetta.Split2JpgMigrationToolPlugin

Migration Tool Plug-in to split multi-page files to multiple jpg files
2
star
34

Rosetta.NetAppStoragePlugin

Java
1
star
35

Rosetta.IABookReaderAltoViewer

Java
1
star
36

Rosetta.NFSInPlaceStoragePlugin

Java
1
star
37

cloudapp-InnReach-setup

Easy setup of the locations
TypeScript
1
star
38

MARC-2-BF2

Crosswalk from MARC21 to BIBFRAME2
XSLT
1
star
39

Rosetta.JWPlayerViewer

Java
1
star
40

Rosetta.DCReplacePlugin

Java
1
star
41

Rosetta.IABookReaderViewer

JavaScript
1
star
42

Rosetta.IABookReaderIIIFViewer

JavaScript
1
star
43

alma-invoice-line-tax-calculator

Invoice Line Tax Calculator Cloud App for Ex Libris Alma
TypeScript
1
star
44

cloudapp-tutorials

Tutorials for Ex Libris CloudApps
TypeScript
1
star
45

Rosetta.DummyCustomFixityPlugin

Java
1
star
46

Rosetta.FilePathVppPlugin

Java
1
star
47

Rosetta.CMS_Sync_Tool

Rosetta.CMS_Sync_Tool
Java
1
star
48

Rosetta.RegexpFieldValidatorPlugin

Java
1
star
49

Rosetta.CustomFigsharePublisherPlugin

Java
1
star
50

Rosetta.ClamAVVirusCheckPlugin

Shell
1
star
51

print-bib-record

Cloud App for printing Bib records from Alma
XSLT
1
star
52

Rosetta.UnzipJavaDecomposerPlugin

Java
1
star
53

Rosetta.CustomNFSStoragePlugin

Java
1
star
54

Archive-It-Open-Search-API-Primo-widget

customization adding widget containing search results from Archive-It open API when searching on Primo
JavaScript
1
star
55

campusM-CLEK

campusM Connect Layer Extension Kit
Java
1
star
56

exl-touchnet-connector

Connector between Ex Libris Alma and Primo and the Touchnet payment system
JavaScript
1
star
57

Discovery-Showcase-demo

HTML
1
star
58

Rosetta.DepositTool

End to end deposit example using Rosetta SDK and Web Services.
Java
1
star