Skip to content

Commit 5ab4236

Browse files
authored
chore(browser-bundle): move to esbuild instead of browserify
note that now the browser tests are not run on every push, but only on PRs. developers can run them locally with `npm run test:browser`. Fix #387
1 parent 07f764c commit 5ab4236

29 files changed

Lines changed: 4465 additions & 4187 deletions

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/browser-bundle/web-test-runner.config.mjs

.github/workflows/browser-test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# docs https://playwright.dev/docs/ci-intro#setting-up-github-actions
2+
name: Browser Tests
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: [master]
8+
pull_request:
9+
branches: [master]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js 20.x
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 20.x
20+
cache: "npm"
21+
- name: Install Dependencies
22+
run: npm ci
23+
- name: Install linux rollup optional dependencies
24+
run: npm i @rollup/rollup-linux-x64-gnu -D
25+
- name: Install Playwright Browsers
26+
run: npx playwright install --with-deps
27+
- name: Build
28+
run: npm run build
29+
- name: Test with browser bundle
30+
timeout-minutes: 2
31+
run: |
32+
npm run test:browser

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ jobs:
104104
runs-on: ubuntu-latest
105105
steps:
106106
- uses: actions/checkout@v2
107-
- uses: actionsx/prettier@v2
107+
- uses: actionsx/prettier@v3
108108
with:
109109
args: --check .

.husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm test
4+
npm run test

examples/browser/counter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>Browser Counter Example</title>

examples/browser/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>Browser Native node-wot tryout</title>

examples/browser/smart-coffee-machine.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html>
33
<head>
44
<title>Smart Coffee Machine</title>

0 commit comments

Comments
 (0)