Skip to content

Commit

Permalink
better cdn links in guide
Browse files Browse the repository at this point in the history
  • Loading branch information
georgealways committed Nov 21, 2021
1 parent 568a580 commit 2530720
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ For quick sketches, you can import lil-gui directly from a CDN.

```html
<script type="module">
import GUI from '//cdn.jsdelivr.net/npm/lil-gui@VERSION/+esm';
import GUI from 'https://cdn.jsdelivr.net/npm/lil-gui@VERSION/+esm';
</script>
```

The library is also available in UMD format under the namespace `lil`.

```html
<script src="//cdn.jsdelivr.net/npm/lil-gui@VERSION"></script>
<script src="https://cdn.jsdelivr.net/npm/lil-gui@VERSION"></script>
<script>
var GUI = lil.GUI;
</script>
Expand Down
4 changes: 2 additions & 2 deletions scripts/homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ guide = guide.replace( /^## ([\s\S]*?)$/gm, function( _, heading ) {

} );

// include version in CDN examples, bad form to use bare/latest
guide = guide.replace( /@VERSION/g, '@' + pkg.version );
// include major & minor version in CDN examples, bad form to use bare/latest
guide = guide.replace( /@VERSION/g, '@' + pkg.version.substring( 0, pkg.version.lastIndexOf( '.' ) ) );

// API.md
// -----------------------------------------------------------------------------
Expand Down

0 comments on commit 2530720

Please sign in to comment.