diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml new file mode 100644 index 000000000..dcbd1b13c --- /dev/null +++ b/.github/workflows/playwright.yml @@ -0,0 +1,30 @@ +name: Playwright Tests +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + test: + defaults: + run: + working-directory: ./examples/esm + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: npm install + - name: Install Playwright Browsers + run: npx playwright install --with-deps + - name: Run Playwright tests + run: npm run test + - uses: actions/upload-artifact@v4 + if: ${{ !cancelled() }} + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/docs/index.md b/docs/index.md index 6b7d4e5ff..adaf22f63 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,6 +13,7 @@ ITK-Wasm [](https://pypi.org/project/itkwasm/) [](https://zenodo.org/badge/latestdoi/45812381) +[](https://github.com/InsightSoftwareConsortium/ITK-Wasm)   diff --git a/docs/typescript/distribution/index.md b/docs/typescript/distribution/index.md index 3fbe9a810..0e9d29fef 100644 --- a/docs/typescript/distribution/index.md +++ b/docs/typescript/distribution/index.md @@ -1,6 +1,7 @@ # Distribution -This sections walks through examples on how to distribution applications for deployment that depend on itk-wasm packages. +This section provides examples of how to distribute applications +for deployment that rely on [ITK-Wasm packages](../../introduction/packages.md). ```{toctree} :maxdepth: 1 @@ -10,4 +11,4 @@ umd.md vite.md webpack.md node.md -``` \ No newline at end of file +``` diff --git a/examples/esm/.gitignore b/examples/esm/.gitignore new file mode 100644 index 000000000..58786aac7 --- /dev/null +++ b/examples/esm/.gitignore @@ -0,0 +1,7 @@ + +# Playwright +node_modules/ +/test-results/ +/playwright-report/ +/blob-report/ +/playwright/.cache/ diff --git a/examples/esm/README.md b/examples/esm/README.md new file mode 100644 index 000000000..6cc09c0ad --- /dev/null +++ b/examples/esm/README.md @@ -0,0 +1,27 @@ +ITK-Wasm ESM Example +==================== + +This example demonstrates how to use the +[ITK-Wasm](https://wasm.itk.org/) ESM module from +a an HTML script tag for access to the image and mesh IO module that are +distributed on the [jsDelivr](https://www.jsdelivr.com/) [content delivery +network](https://en.wikipedia.org/wiki/Content_delivery_network). + +More information can be found in the [example +documentation](https://docs.itk.org/projects/wasm/en/latest/typescript/distribution/esm.html). + +## Run Locally + +``` +npm install +npm run start +``` + +And visit [http://localhost:8080/](http://localhost:8080/). + +## Development + +``` +npm install +npm test +``` diff --git a/examples/esm/dist/index.html b/examples/esm/dist/index.html new file mode 100644 index 000000000..65845e216 --- /dev/null +++ b/examples/esm/dist/index.html @@ -0,0 +1,64 @@ + + +
+