Skip to content

Commit

Permalink
Update README with better install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgraham committed Nov 19, 2024
1 parent 33d15c8 commit 31c407d
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,34 @@ The official React implementation of the Forge design system created by [@ziguro

## Installation

### NPM

Set the scoped package registry in your `.npmrc` file:
```bash
registry=https://registry.npmjs.org/
@zigurous:registry=https://npm.pkg.github.com
```

Run one of the following commands in a terminal:
- Install with npm `npm install @zigurous/forge-react`
- Install with yarn `yarn add @zigurous/forge-react`
- Install with pnpm `pnpm add @zigurous/forge-react`

### CDN

Add one of the following links to your HTML:

#### CloudFront
Available from any of the following:
- Install with CloudFront `https://cdn.zigurous.com/[email protected]/dist/index.min.js`
- Install with jsDelivr `https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.js`
- Install with Statically `https://cdn.statically.io/gh/zigurous/forge-react/1.0.0/dist/index.min.js`

Add the script in your HTML file:
```html
<script src="https://cdn.zigurous.com/[email protected]/dist/index.min.js">
```
#### jsDelivr
### GitHub Packages
```html
<script src="https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.js">
```
#### Statically
Generate a [personal access token](https://github.com/settings/tokens) in your GitHub account with the `read:packages` scope. GitHub requires an auth token to download packages even if they are public.
```html
<script src="https://cdn.statically.io/gh/zigurous/forge-react/1.0.0/dist/index.min.js">
Add an `.npmrc` file in the same directory as your `package.json` with the lines below. Replace `{NPM_TOKEN}` with the token you generated in the previous step.
```
registry=https://registry.npmjs.org/
@zigurous:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken={NPM_TOKEN}
```
Install the package using your preferred package manager:
- Install with npm `npm install @zigurous/forge-react`
- Install with yarn `yarn add @zigurous/forge-react`
- Install with pnpm `pnpm add @zigurous/forge-react`
## Usage
```jsx
Expand Down

0 comments on commit 31c407d

Please sign in to comment.