Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document cdnjs usage #457

Merged
merged 5 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,31 +315,31 @@ To run the examples you must first create a dist build of this library in the mo
npm run build
```

## UMD Builds
## CDN versions

If you want to load a minified UMD build directly in the browser you can use one of the popular npm
CDNs:
This module may be loaded directly into a browser from any of the following CDNs:

**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd)**:
```html
<script src="https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js"></script>
<script>
alert(uuidv4());
</script>
```

or

**Using [jsDelivr](https://cdnjs.com/libraries/uuidttps://cdn.jsdelivr.net/npm/uuid@latest/dist/umd)**:
```html
<script src="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js"></script>
<script>
alert(uuidv4());
</script>
```

Available bundles:
**Using [cdnjs](https://cdnjs.com/libraries/uuid)**:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js"></script>
```

- https://unpkg.com/uuid@latest/dist/umd/
- https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/
These CDNs all provide the same `uuidv4()` method:
```html
<script>
uuidv4(); // => 55af1e37-0734-46d8-b070-a1e42e4fc392
</script>
```

## "getRandomValues() not supported"

Expand Down
30 changes: 17 additions & 13 deletions README_js.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,31 +304,35 @@ To run the examples you must first create a dist build of this library in the mo
npm run build
```

## UMD Builds
## CDN versions

If you want to load a minified UMD build directly in the browser you can use one of the popular npm
CDNs:
This module may be loaded directly into a browser from any of the following CDNs:

**Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd)**:

```html
<script src="https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js"></script>
<script>
alert(uuidv4());
</script>
```

or
**Using [jsDelivr](https://cdnjs.com/libraries/uuidttps://cdn.jsdelivr.net/npm/uuid@latest/dist/umd)**:

```html
<script src="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js"></script>
<script>
alert(uuidv4());
</script>
```

Available bundles:
**Using [cdnjs](https://cdnjs.com/libraries/uuid)**:

- https://unpkg.com/uuid@latest/dist/umd/
- https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js"></script>
```

These CDNs all provide the same `uuidv4()` method:

```html
<script>
uuidv4(); // => 55af1e37-0734-46d8-b070-a1e42e4fc392
</script>
```

## "getRandomValues() not supported"

Expand Down