Getting Started
Install the private GitHub hosted package .
$ npm install @padillaco/customizable-selectNote: You must be authenticated with a GitHub host before installing the package. See the following two sections:
Authenticating via Command Line
Use the GitHub CLI to authenticate via command line.
# Install GitHub CLI
$ brew install gh
# Authenticate with a GitHub host
$ gh auth login
→ What account do you want to log into? GitHub.com
→ What is your preferred protocol for Git operations? SSH
→ Upload your SSH public key to your GitHub account? /Users/username/.ssh/github.pub
→ Title for your SSH key: GitHub CLI
# Login with a web browser
→ How would you like to authenticate GitHub CLI? Login with a web browser
# or paste an authentication token...
# Create a GitHub personal access token using this guide:
# https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
→ How would you like to authenticate GitHub CLI? Paste an authentication tokenAuthenticating Using an .npmrc File
1. Create an .npmrc file at the root of the project folder, and add the following configuration:
//npm.pkg.github.com/:_authToken=${GH_PKG_REGISTRY_AUTH_TOKEN}
@padillaco:registry=https://npm.pkg.github.com/2. Create a classic GitHub personal access token using this guide , or follow these steps:
- In the upper-right corner of any page on GitHub, click your profile photo, then click Settings.
- In the left sidebar, click Developer settings.
- In the left sidebar, under Personal access tokens, click Tokens (classic).
- Click Generate new token, then click Generate new token (classic).
- In the Note field, give your token a descriptive name.
- To give your token an expiration, select Expiration, then choose a default option, or click Custom to enter a date.
- Select the scopes shown below. A token with no assigned scopes can only access public information. For more information, see Scopes for OAuth apps .
- repo
- read:packages
- write:packages (only if you are commiting to the package/repo)
- Click Generate token.
- Copy the new token to your clipboard.
3. Edit your .bashrc (or .zshrc) file (normally located in /Users/your-username/ for Mac users), and add the following line, while replacing [TOKEN] with the personal access token you’ve just created.
export GH_PKG_REGISTRY_AUTH_TOKEN=[TOKEN]Development
This project uses Rollup.js to bundle TypeScript into CommonJS and ES Modules, and generate type declaration files for typechecking.
To run the development environment while watching for changes:
$ npm startTo build the project:
$ npm run buildLast updated on