-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README with better install instructions
- Loading branch information
1 parent
33d15c8
commit 31c407d
Showing
1 changed file
with
17 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|