Ready to Learn?Ex Libris products all provide open APIs

Tech Blog

 

Sharing Your AEK Code

Ido Peled on August 31st, 2017

Sharing code with the campusM developer community can be done in two ways:

  • Share your code on GitHub, like we do here (recommnded!)
  • Share it in the NPM

This post will explain the process of how to share your code with the campusM developer community, and what you will need to do to make sure that your project can be used.

Before You Share Your Code

Before loading the code to GitHub or the NPM, please make sure to follow these steps:

#

Description

1

The first thing you will want to do is remove any content is specific to your organization. This could be API keys or services that have been configured

2

Provide helpful notes for this project in the readme.md file which you can use to explain in further detail what is required to get this up and running

3

It might also useful to share a sample response file to allow people to see it in action

4

You might also want to change the name of the package as shown below. This will stop you from deploying over the public version with a new private version

5The next step will be to go into the package.json file and make the following changes:
  1. Change the package name to a different name (consider adding "public" to it)
  2. Add in the boilerplate and read access permissions 


From the next screen you can see the changes that were made to the package.json file.

You can see we have changed the name of the package just to allow us to make sure that no private information is being shared. It also means that we can transfer ownership of this package to someone at a later date.

You can see that we have given read access only to this package which no one can push changes to this package only the people you have given access to the write.

Once you have completed the above recommended changes, you can provide the information within the readme.md file.

Loading Your Code

To load your package to GitHub, please follow the instructions here: https://guides.github.com/activities/hello-world/

To load the package to the NPM you can execute the following command within the package directory:

aek push

This will push your package into the NPM site. Please note that if you decide to make any changes to this package, you will need to update the version number before you do run the aek push command as this will update the version to a new version.

Sharing Your Code on the Ex Libris Developer Network

Whichever way you choose to share your code, don’t forget to also write a blog about it on the Ex Libris Developer Network, ensuring the rest of the developer community will know about it: https://developers.exlibrisgroup.com/blog/tag/campusm

For any questions don't hesitate to email us at: developerportal_campusm@exlibrisgroup.com.