Skip to content

Commit c562fbb

Browse files
Rich-HarrisRich Harris
and
Rich Harris
authored
switch to codemirror (sveltejs#252)
* switch to codemirror * style tweaks * focus management * tweak styles * server-render initially selected file * fix * fix * fix most tests * get tests passing --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 7c5ee87 commit c562fbb

File tree

12 files changed

+461
-309
lines changed

12 files changed

+461
-309
lines changed

.github/workflows/node.js.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
1212

1313
jobs:
14-
build:
14+
test:
1515
runs-on: ubuntu-latest
1616

1717
strategy:
@@ -29,5 +29,4 @@ jobs:
2929
cache: 'pnpm'
3030
- run: pnpm install --frozen-lockfile
3131
- run: pnpm playwright install chromium
32-
- run: pnpm build
3332
- run: pnpm test

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@
1010
.apps
1111
.vercel
1212
/content/tutorial/common/.svelte-kit
13-
/content/tutorial/common/node_modules
13+
/content/tutorial/common/node_modules
14+
/test-results

package.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"dev": "vite dev",
66
"build": "node scripts/create-common-bundle && vite build",
77
"preview": "vite preview",
8-
"test": "playwright test",
8+
"test": "npm run build && playwright test",
99
"check": "svelte-check --tsconfig ./jsconfig.json",
1010
"check:watch": "svelte-check --tsconfig ./jsconfig.json --watch",
1111
"lint": "prettier --ignore-path .gitignore --check --plugin-search-dir=. .",
@@ -32,14 +32,27 @@
3232
},
3333
"type": "module",
3434
"dependencies": {
35+
"@codemirror/autocomplete": "^6.4.2",
36+
"@codemirror/commands": "^6.2.2",
37+
"@codemirror/lang-css": "^6.1.1",
38+
"@codemirror/lang-html": "^6.4.2",
39+
"@codemirror/lang-javascript": "^6.1.4",
40+
"@codemirror/language": "^6.6.0",
41+
"@codemirror/state": "^6.2.0",
42+
"@codemirror/view": "^6.9.2",
3543
"@fontsource/roboto-mono": "^4.5.10",
44+
"@lezer/common": "^1.0.2",
45+
"@lezer/highlight": "^1.1.3",
46+
"@lezer/javascript": "^1.4.1",
47+
"@lezer/lr": "^1.3.3",
48+
"@replit/codemirror-lang-svelte": "^6.0.0",
3649
"@rich_harris/svelte-split-pane": "^1.0.0",
3750
"@webcontainer/api": "^1.0.2",
3851
"adm-zip": "^0.5.10",
3952
"ansi-to-html": "^0.7.2",
4053
"base64-js": "^1.5.1",
54+
"codemirror": "^6.0.1",
4155
"marked": "^4.2.12",
42-
"monaco-editor": "^0.36.1",
4356
"port-authority": "^2.0.1",
4457
"prism-svelte": "^0.5.0",
4558
"prismjs": "^1.29.0",

playwright.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ const config: PlaywrightTestConfig = {
55
command: 'pnpm preview',
66
port: 4173
77
},
8-
timeout: 60000
8+
timeout: 60000,
9+
use: {
10+
trace: {
11+
mode: 'retain-on-failure'
12+
}
13+
}
914
};
1015

1116
export default config;

pnpm-lock.yaml

Lines changed: 220 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)