Skip to content

Commit bd77f00

Browse files
authored
Add CDN usage (#46)
1 parent 25d4b8a commit bd77f00

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ Styles and API are not guarantee between minor versions prior to v1.0.0.
5454

5555
## Getting started
5656

57+
### From NPM
58+
5759
You will need to install `yarn` (for example with `npm install --global yarn`).
5860

5961
To build the components packages, execute:
@@ -70,6 +72,22 @@ cd packages/components
7072
yarn start
7173
```
7274

75+
### From CDN
76+
77+
A pre-bundled script that contains all APIs needed to use Jupyter UI Toolkit is available on CDN. You can use this script by adding [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to the script element and then importing from the CDN.
78+
79+
```html
80+
<!DOCTYPE html>
81+
<html lang="en">
82+
<head>
83+
<script type="module" src="https://unpkg.com/@jupyter-notebook/web-components"></script>
84+
</head>
85+
<!-- ... -->
86+
</html>
87+
```
88+
89+
The above CDN location points to the latest release of `@jupyter-notebook/web-components`. It is advised that when you deploy your site or app, you import the specific version you have developed and tested with.
90+
7391
### JupyterLab demo extension
7492

7593
To test locally the JupyterLab demo extension, using `conda` package manager:

0 commit comments

Comments
 (0)