Skip to content

Commit fcb0542

Browse files
committed
Update README with better installation instructions
1 parent 3c7a043 commit fcb0542

File tree

1 file changed

+21
-27
lines changed

1 file changed

+21
-27
lines changed

README.md

+21-27
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,36 @@ The official CSS implementation of the Forge design system created by [@zigurous
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-css`
21-
- Install with yarn `yarn add @zigurous/forge-css`
22-
- Install with pnpm `pnpm add @zigurous/forge-css`
23-
24-
Import the css file in your code:
25-
```js
26-
import '@zigurous/forge-css/dist/index.min.css'
27-
```
28-
2911
### CDN
3012

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

18+
Link to the stylesheet in your HTML file:
3519
```html
3620
<link href="https://cdn.zigurous.com/[email protected]/dist/index.min.css" rel="stylesheet">
3721
```
3822

39-
#### jsDelivr
23+
### GitHub Packages
4024

41-
```html
42-
<link href="https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.css" rel="stylesheet">
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.*
26+
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}
4332
```
4433

45-
#### Statically
34+
Install the package using your preferred package manager.
35+
- Install with npm `npm install @zigurous/forge-css`
36+
- Install with yarn `yarn add @zigurous/forge-css`
37+
- Install with pnpm `pnpm add @zigurous/forge-css`
4638

47-
```html
48-
<link href="https://cdn.statically.io/gh/zigurous/forge-css/1.0.0/dist/index.min.css" rel="stylesheet">
39+
40+
Import the css file in your code.
41+
```js
42+
import '@zigurous/forge-css/dist/index.min.css'
4943
```

0 commit comments

Comments
 (0)