Stryber React UI Components (Matterhorn)
UI library for React
How to Run in Storybook mode (for demo and development purposes)
- Run following commands in the terminal:
npm i npm start
- Browse to 'http://localhost:9001/' (should normally open automatically after step 1)
Using the library within other projects
Projects that would use this package have two options of how to install and import this private library within our organization:
a) Install as an NPM package from GitHub registry (THE RIGHT WAY).
- Create an '.npmrc' file at the root of the project that will be using Matterhorn library.
'.npmrc' file contents:
Authorize to your GitHub account and create a new 'Personal Access Token' (https://github.com/settings/tokens). This token should have read:packages permission checked.
Copy the created TOKEN and use it to create an '
/.npmrc' file located in the '' (home) folder of your user:
- After this The package can be installed by typing the following command in the terminal:
npm i @firstname.lastname@example.org --save
b) Install directly from the git repository's URL by typing the following command in the terminal (THE EASIER WAY):
npm i git+ssh://email@example.com/stryberventures/stryber-react-ui-components.git#0.0.8
How to build library for production
npm i npm run build
How to publish library to GitHub npm registry (Beta)
- Create a personal access token in the "Developer settings" page on GitHub (https://github.com/settings/tokens)
Note: Your account must have appropriate GitHub permissions for you to be able to publish it
- Create '~/.npmrc' file:
Note: Full guide can be found here https://help.github.com/en/github/managing-packages-with-github-package-registry/configuring-npm-for-use-with-github-package-registry
- Publish this package to GitHub npm registry by running following command(s) in the terminal: