Skip to content

Commit 31c407d

Browse files
committed
Update README with better install instructions
1 parent 33d15c8 commit 31c407d

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed

README.md

+17-24
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,34 @@ The official React implementation of the Forge design system created by [@ziguro
88

99
## Installation
1010

11-
### NPM
12-
13-
Set the scoped package registry in your `.npmrc` file:
14-
```bash
15-
registry=https://registry.npmjs.org/
16-
@zigurous:registry=https://npm.pkg.github.com
17-
```
18-
19-
Run one of the following commands in a terminal:
20-
- Install with npm `npm install @zigurous/forge-react`
21-
- Install with yarn `yarn add @zigurous/forge-react`
22-
- Install with pnpm `pnpm add @zigurous/forge-react`
23-
2411
### CDN
2512

26-
Add one of the following links to your HTML:
27-
28-
#### CloudFront
13+
Available from any of the following:
14+
- Install with CloudFront `https://cdn.zigurous.com/[email protected]/dist/index.min.js`
15+
- Install with jsDelivr `https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.js`
16+
- Install with Statically `https://cdn.statically.io/gh/zigurous/forge-react/1.0.0/dist/index.min.js`
2917

18+
Add the script in your HTML file:
3019
```html
3120
<script src="https://cdn.zigurous.com/[email protected]/dist/index.min.js">
3221
```
3322
34-
#### jsDelivr
23+
### GitHub Packages
3524
36-
```html
37-
<script src="https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.js">
38-
```
39-
40-
#### Statically
25+
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.
4126
42-
```html
43-
<script src="https://cdn.statically.io/gh/zigurous/forge-react/1.0.0/dist/index.min.js">
27+
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.
28+
```
29+
registry=https://registry.npmjs.org/
30+
@zigurous:registry=https://npm.pkg.github.com
31+
//npm.pkg.github.com/:_authToken={NPM_TOKEN}
4432
```
4533
34+
Install the package using your preferred package manager:
35+
- Install with npm `npm install @zigurous/forge-react`
36+
- Install with yarn `yarn add @zigurous/forge-react`
37+
- Install with pnpm `pnpm add @zigurous/forge-react`
38+
4639
## Usage
4740
4841
```jsx

0 commit comments

Comments
 (0)