Skip to content

Commit

Permalink
Add comment about UNPKG in readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoscalco authored Aug 4, 2019
1 parent 720ba18 commit c1a3e80
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,25 @@ npm install textures

## Usage

Import `textures.js` from NPM with:

```
import textures from 'textures';
```

Or you can use `textures.js` in your html page with a `<script>` tag:
You can also use`textures.js` in your html page with a `<script>` tag, dowloading `textures.js` in a local folder

```
<script src="path/to/textures.js"></script>
```

Then:
or using the Unpkg CDN network

```
<script src="https://unpkg.com/[email protected]/dist/textures.js"></script>
```

Then `textures.js` can be used alongside with `d3` with:

```
const svg = d3
Expand All @@ -44,4 +52,4 @@ svg

## License

MIT
MIT

0 comments on commit c1a3e80

Please sign in to comment.