diff --git a/examples/cdn-example/README.md b/examples/cdn-example/README.md new file mode 100644 index 0000000000..4b95edfbd4 --- /dev/null +++ b/examples/cdn-example/README.md @@ -0,0 +1,11 @@ +# CDN example + +To run the example, open the `index.html` file in your browser. + +If you want to spawn a local webserver, you can use the following commands +(requires Deno, Python, or PHP): + +```sh +corepack yarn install +corepack yarn workspace @uppy-example/cdn dev +``` diff --git a/examples/cdn-example/index.html b/examples/cdn-example/index.html index 69d497efb5..34580dcac9 100644 --- a/examples/cdn-example/index.html +++ b/examples/cdn-example/index.html @@ -2,22 +2,46 @@ - - - + + + + - - + + + + diff --git a/examples/cdn-example/package.json b/examples/cdn-example/package.json index 2606905dcd..c785e5676e 100644 --- a/examples/cdn-example/package.json +++ b/examples/cdn-example/package.json @@ -1,5 +1,8 @@ { - "name": "@uppy-example/cdn-example", + "name": "@uppy-example/cdn", "version": "0.0.0", - "private": true + "private": true, + "scripts": { + "dev": "deno run --allow-net --allow-read https://deno.land/std/http/file_server.ts || python3 -m http.server || php -S localhost:8000" + } } diff --git a/yarn.lock b/yarn.lock index d8d37ccab5..b4bf8254d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9749,9 +9749,9 @@ __metadata: languageName: unknown linkType: soft -"@uppy-example/cdn-example@workspace:examples/cdn-example": +"@uppy-example/cdn@workspace:examples/cdn-example": version: 0.0.0-use.local - resolution: "@uppy-example/cdn-example@workspace:examples/cdn-example" + resolution: "@uppy-example/cdn@workspace:examples/cdn-example" languageName: unknown linkType: soft