sunubus-js-utils
v1.1.17
Published
Sunubus javascript utilities
Downloads
16
Readme
Sunubus js utilities
This repository contains some utility functions and classes that are used throughout the Sunubus project. It is written in JavaScript.
How to setup
First you need node.js v8.12.0 and yarn installed. We recommend using nvm to be able to install and switch between different versions of node.js.
Clone the repository by running:
git clone [email protected]:SunuBus/sunubus-js-utils.git
Then cd into it:
cd sunubus-js-utils
Run yarn to install the dependencies
yarn install
Run it
Since the repo is headless, the only thing we run in it are tests that validate that it's components are functioning correctly.
To run them, run:
yarn test
You can also live test the sdk in the projects it is used in (such as sunubus-game-service
) by using the yarn link
command. This allows you to directly test your changes in the project without deploying to NPM first. For that you will need to first run:
yarn link
After that, go into the project that uses the sdk and run:
yarn link sunubus-js-utils
Your changes should now be reflected in real time.
Developing new utilities
Utilities are located under src/
and are functions or classes located in separate files.
They are further subdivided into multiple folders depending on what category they belong to.
Deployment
The sdk is deployed on npm. To deploy, run:
yarn publish