Skip to content

Commit 2b02993

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents afebffb + 096d28e commit 2b02993

30 files changed

+1367
-2061
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ jobs:
2323
lake --version
2424
- run: npm install
2525
- run: npm run build
26-
- run: npm run build_server
2726
- run: npm run test

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Provides browser support for running Lean in a Monaco editor.
44

5-
This package is based on the VSCode extension
6-
[Lean 4](https://marketplace.visualstudio.com/items?itemName=leanprover.lean4) and the
5+
This package uses the [VSCode extension
6+
"Lean 4"](https://marketplace.visualstudio.com/items?itemName=leanprover.lean4) and the
77
[Lean Infoview](https://www.npmjs.com/package/@leanprover/infoview).
88

99
## Usage
@@ -47,8 +47,10 @@ For some reason, the file (here `test.lean`) cannot be at the root of the file s
4747
The package uses the Lean 4 VSCode extension, which is intended to run in a nodejs runtime. Therefore, we need to install node polyfills.
4848
Here is how this can be done if your project uses Vite:
4949
```
50-
npm install vite-plugin-node-polyfills memfs
50+
npm install [email protected] --save-exact
51+
npm install memfs
5152
```
53+
(We use version 0.17.0 due to this bug: https://github.com/davidmyersdev/vite-plugin-node-polyfills/issues/81)
5254

5355
```ts
5456
// vite.config.ts
@@ -97,7 +99,10 @@ export default {
9799
viteStaticCopy({
98100
targets: [
99101
{
100-
src: normalizePath(path.resolve(__dirname, './node_modules/@leanprover/infoview/dist/*.production.min.js')),
102+
src: [
103+
normalizePath(path.resolve(__dirname, './node_modules/@leanprover/infoview/dist/*.production.min.js')),
104+
normalizePath(path.resolve(__dirname, './node_modules/lean4monaco/webview/webview.js')),
105+
],
101106
dest: 'infoview'
102107
}
103108
]
@@ -112,4 +117,4 @@ export default {
112117
The error I typically got is:
113118
```
114119
this._configurationService.onDidChangeConfiguration is not a function
115-
```
120+
```

cypress/e2e/spec.cy.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,19 @@ describe('Editor Test', () => {
2020
.should(($p) => {
2121
expect(getComputedStyle($p.get(0)).getPropertyValue('--vscode-editor-background')).to.equal("#ffffff")
2222
})
23-
cy.wait(4000)
2423
cy.get('[data-cy="theme-dark"]').click()
25-
cy.wait(4000)
2624
cy.contains('#check Nat')
2725
.should(($p) => {
2826
expect(getComputedStyle($p.get(0)).getPropertyValue('--vscode-editor-background')).to.equal("#1e1e1e")
2927
})
3028
})
3129
it('inputs unicode', () => {
32-
3330
cy.visit('http://localhost:5173/')
3431
cy.get('[data-cy="leader-backslash"]').click()
3532
cy.contains('#check Nat').click("left")
3633
cy.get('body').type('\\alpha')
3734
cy.contains('α')
38-
cy.wait(4000)
3935
cy.get('[data-cy="leader-comma"]').click()
40-
cy.wait(4000)
4136
cy.contains('#check Nat').click("left")
4237
cy.get('body').type(',beta')
4338
cy.contains('β')

demo/package-lock.json

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

0 commit comments

Comments
 (0)