Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,24 @@ concurrency:
cancel-in-progress: true

jobs:
# Hard gate: the site only deploys when the chromium suite is green.
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run tests
run: npx playwright test --project=chromium

deploy:
needs: test
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Tests

on:
push:
branches:
- main
- improvement
pull_request:
workflow_dispatch:

concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Playwright (${{ matrix.project }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Desktop browsers are the compatibility gate (all three must pass).
# Mobile/tablet are best-effort and allowed to fail until they are
# stabilized.
project: [chromium, firefox, webkit]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps
- name: Run tests
run: npx playwright test --project=${{ matrix.project }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-report-${{ matrix.project }}
path: playwright-report/
retention-days: 14
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
node_modules/
.DS_Store
*.log
.env
.env.*
!.env.example
opencode.json
.cache/
dist/
playwright-report/
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ That single line is the whole installation.
import it with one click and see every note in place.
- **Polished UI.** A floating toolbar, a Figma-style comments panel, light/dark
themes that auto-adapt to your page, and full keyboard shortcuts.
- **Tiny & dependency-free.** ~40 KB of vanilla JavaScript, zero dependencies.
- **Tiny & dependency-free.** ~110 KB of vanilla JavaScript (unminified, zero
dependencies) — minify it for production to cut that to a few tens of KB.

---

Expand Down Expand Up @@ -348,7 +349,7 @@ Annotate.version; // "1.2.0"
```bash
git clone git@github.com:reviewjs/annotate.git
cd annotate
npm start # serves the demo at http://localhost:3000
npm start # serves the demo at http://localhost:4200
```

Open [`index.html`](./index.html) and start annotating. Framework examples live
Expand Down
Loading
Loading