diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..17cb0b4 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + ci: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v7 + + - uses: pnpm/setup@v2 + with: + runtime: node@22 + cache: true + + - run: pnpm type-check + - run: pnpm test + - run: pnpm lint + - run: pnpm build + - run: pnpm build:examples diff --git a/.github/workflows/npm-publish.yaml b/.github/workflows/npm-publish.yaml index 25de4b4..dde430c 100644 --- a/.github/workflows/npm-publish.yaml +++ b/.github/workflows/npm-publish.yaml @@ -25,6 +25,7 @@ jobs: - run: pnpm test - run: pnpm lint - run: pnpm build + - run: pnpm build:examples - name: Publish run: pnpm publish --access public --no-git-checks diff --git a/README.md b/README.md index 7df8e5a..3b663cd 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,8 @@ import './style.css' `index.html` is a normal Vite app next to the userscript. `vite` serves it at `/`. `vite build` writes it to `dist/` beside `{fileName}.user.js`. +The plugin sets `build.assetsInlineLimit` very high so userscript assets become data URLs. The HTML app’s assets will too, unless you set `build.assetsInlineLimit` yourself. + > [!WARNING] > Keep the page's `