@team-florence/ui
v0.5.1
Published
Florence UI - React Component Library
Downloads
13
Readme
Development Setup
- Clone the repo
git clone [email protected]:team-florence/florence-ui.git
cd florence-ui
yarn install
Running locally
To run florence-ui
locally, you will need to use yalc, which greatly simplifies running npm packages locally. yalc
will allow you to 'link' the local version of the package to your local application (i.e. Flex):
yarn global add yalc
to installyalc
globally on your machine (required)cd florence-ui
yalc publish
- This will 'publish' the package on your local machine so that it can be used by applications
cd
into the application using the package (i.e. Flex)yalc add @team-florence/ui
- This will link Flex to the local version of the package you just published instead of the version published on the npm registry
Publishing to NPM
To publish a new version of the package to NPM, we will use a tool called np. This tool ensures all of the correct steps are followed using an interactive CLI.
Note: You will need access to 1Password, as you will be copying & pasting the NPM Publish Token during the publishing process
yarn global add np
cd florence-ui
- run
np
- You will be guided through the process of publishing via the interactive CLI
NPM tokens
We have an NPM_TOKEN environment variable for Flex which is used to fetch/publish our @team-florence/ui private package that is hosted in NPM.
We now have 3 access tokens with different scopes depending on what you are trying to do, which consist of the following:
Read-Only Token
This should be used for local development only. In Flex & Rota this is the NPM_TOKEN environment variable in your .env file. We have updated 1Password to add this to the .env file there.
This is in 1Password under “NPM - Read-Only (Dev) Token”
Note: Everyone must update their local .env file(s) to use this new token - otherwise yarn will fail to run.
CI Token
As the name states, this is the NPM_TOKEN used by continuous integration. We have updated this with the new token value in all Flex & Rota applications that use it.
This is in 1Password under “NPM - CI Token”.
Publish Token
This is the token you will need to use if you wish to publish any changes.
This is in 1Password under "NPM - Publish Token".