Skip to content

Commit d6473cb

Browse files
committed
Update README with better install instructions
1 parent 3c7a043 commit d6473cb

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

README.md

+20-26
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
11+
### CDN
12+
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`
17+
18+
Link to the stylesheet in your HTML file:
19+
```html
20+
<link href="https://cdn.zigurous.com/[email protected]/dist/index.min.css" rel="stylesheet">
21+
```
22+
23+
### GitHub Packages
1224

13-
Set the scoped package registry in your `.npmrc` file:
14-
```bash
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+
```
1529
registry=https://registry.npmjs.org/
1630
@zigurous:registry=https://npm.pkg.github.com
31+
//npm.pkg.github.com/:_authToken={NPM_TOKEN}
1732
```
1833

19-
Run one of the following commands in a terminal:
34+
Install the package using your preferred package manager:
2035
- Install with npm `npm install @zigurous/forge-css`
2136
- Install with yarn `yarn add @zigurous/forge-css`
2237
- Install with pnpm `pnpm add @zigurous/forge-css`
2338

39+
2440
Import the css file in your code:
2541
```js
2642
import '@zigurous/forge-css/dist/index.min.css'
2743
```
28-
29-
### CDN
30-
31-
Add one of the following links to your HTML:
32-
33-
#### CloudFront
34-
35-
```html
36-
<link href="https://cdn.zigurous.com/[email protected]/dist/index.min.css" rel="stylesheet">
37-
```
38-
39-
#### jsDelivr
40-
41-
```html
42-
<link href="https://cdn.jsdelivr.net/gh/zigurous/[email protected]/dist/index.min.css" rel="stylesheet">
43-
```
44-
45-
#### Statically
46-
47-
```html
48-
<link href="https://cdn.statically.io/gh/zigurous/forge-css/1.0.0/dist/index.min.css" rel="stylesheet">
49-
```

0 commit comments

Comments
 (0)