-
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.
- Loading branch information
Showing
2 changed files
with
17 additions
and
8 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 |
---|---|---|
|
@@ -23,23 +23,27 @@ A collection of experimental Web Components. | |
|
||
About [Web Components][mdn]. | ||
|
||
See also: [web-vitals-element][]. | ||
|
||
## Usage | ||
|
||
Available on [Unpkg][] and [Skypack][] CDNs. Note, templates can't currently be accessed from Skypack. | ||
|
||
```html | ||
<my-skip-link></my-skip-link> | ||
|
||
|
||
<my-options template-host="github.io"></my-options> | ||
<my-options template-host="unpkg.com"></my-options> | ||
|
||
<script src="https://nfreear.github.io/web-components/index.js" | ||
<script src="https://cdn.skypack.dev/ndf-web-components?min" | ||
type="module" async crossorigin | ||
></script> | ||
``` | ||
|
||
## Custom import | ||
|
||
```js | ||
import { customImport } from 'https://nfreear.github.io/web-components/custom.js'; | ||
import { customImport } from 'https://unpkg.com/ndf-web-components@1.1.0/custom.js'; | ||
|
||
const MOD = await customImport('my-star-rating, my-skip-link'); | ||
``` | ||
|
@@ -62,4 +66,9 @@ Then: | |
[mit]: https://nfreear.mit-license.org/#2021 | ||
[npm]: https://www.npmjs.com/package/ndf-web-components | ||
[npm-img]: https://img.shields.io/npm/v/ndf-web-components | ||
[unpkg]: https://unpkg.com "A fast, global content delivery network for everything on npm" | ||
[up-cdn]: https://unpkg.com/[email protected]/index.js | ||
[skypack]: https://cdn.skypack.dev "A JavaScript Delivery Network for modern web apps" | ||
[sp-cdn]: https://cdn.skypack.dev/ndf-web-components | ||
[mdn]: https://developer.mozilla.org/en-US/docs/Web/Web_Components | ||
[web-vitals-element]: https://github.com/stefanjudis/web-vitals-element |
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