nf-app-react-components
is a library that provides a collection of common React components used across the NuFlights application. This library is published as a private GitHub package, and access is restricted to authorized users who have access to the associated GitHub repository.
To install the nf-app-react-components
package, follow these steps:
-
Generate a Personal Access Token:
You must use a personal access token (classic) with the appropriate scopes to publish and install packages in GitHub Packages. Refer to the "Introduction to GitHub Packages" documentation for detailed information on creating a personal access token.
-
Authenticate with npm:
You can authenticate to GitHub Packages using npm in one of two ways:
-
Method 1: Editing
~/.npmrc
File:Edit your per-user
~/.npmrc
file to include your personal access token (classic). If this file does not exist, create it and add the following lines, replacingTOKEN
with your personal access token://npm.pkg.github.com/:_authToken=TOKEN @NuFlights:registry=https://npm.pkg.github.com/
-
Method 2: Command Line Login:
Alternatively, you can log in to npm on the command line using your GitHub username and personal access token.
-
Once you have successfully authenticated, you can install the package using your preferred package manager. Here's an example using yarn:
yarn add @NuFlights/nf-app-react-components
After completing the installation, you can start using the components from the nf-app-react-components
package in your React application.