-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
5,550 additions
and
13,407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
module.exports = { | ||
root: true, | ||
env: { browser: true, es2020: true }, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react-hooks/recommended', | ||
], | ||
ignorePatterns: ['dist', '.eslintrc.cjs'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['react-refresh'], | ||
rules: { | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
client/dist | ||
server/build | ||
client/public/package_versions.json | ||
dist | ||
**/.DS_Store | ||
dist-ssr | ||
*.local | ||
|
||
**/.lake | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
# Adding Projects | ||
|
||
To add a new project, one needs to add a lean project here. | ||
|
||
Projects can be any Lean projects. | ||
|
||
1. You can build the lean project manually. For automatic updates, your project should include a file `ProjectName/build.sh` which can be | ||
executed to build the project. See [lean4web-tools](https://github.com/hhu-adam/lean4web-tools) for an example. | ||
2. Your project should add the dependency | ||
```lean | ||
require webeditor from git | ||
"https://github.com/hhu-adam/lean4web-tools.git" @ "main" | ||
``` | ||
in its `lakefile.lean`. This package adds some simple tools like `#package_version`. | ||
3. For a project to appear in the settings, you need to add it to `config.json`: | ||
add a new entry `{folder: "_", name: "_"}` to `projects`, where "folder" is the | ||
folder name inside `Projects/` and "name" is the free-text display name. | ||
* Optionally, you can also specify examples in the `config.json` each of these | ||
examples will appear under "Examples" in the menu. A full project entry would then | ||
look as follows: | ||
``` | ||
{ "folder": "folder name inside `Projects/`", | ||
"name": "My Custom Lean Demo", | ||
"examples": [ | ||
{ "file": "path/inside/the/lean/package.lean", | ||
"name": "My Cool Example"}, | ||
... | ||
] | ||
} | ||
``` | ||
* Compare to the entry for the `mathlib-demo` project. | ||
To add new projects, add any Lean project in the folder `Projects/`, e.g. `Projects/my-cool-project/`. | ||
You can either build your Lean project manually or you include a script | ||
`Projects/my-cool-project/build.sh` for automatic builds. | ||
Usually a build script looks like this: | ||
|
||
``` | ||
#!/usr/bin/env bash | ||
# Operate in the directory where this file is located | ||
cd $(dirname $0) | ||
# add code here to update the project correctly | ||
lake build | ||
``` | ||
|
||
A project added this way can then be accessed online with `https://your.url.com/#project=my-cool-project`. | ||
For the project to appear in the Settings, you need to update `client/config/config.json` by adding | ||
a new entry `{folder: "my-cool-project", name: "My Cool Project"}` to `projects`; here `folder` is the | ||
folder name inside `Projects/` and `name` is the free-text display name. | ||
|
||
If you want to add Examples, you should add them as valid Lean files to your project and then expand | ||
the config entry of your project in `config.json` as follows: | ||
|
||
``` | ||
{ "folder": "my-cool-project`", | ||
"name": "My Cool Project", | ||
"examples": [ | ||
{ "file": "MyCustomProject/Demo1.lean", | ||
"name": "My Cool Example" } | ||
] | ||
} | ||
``` | ||
|
||
This will add an entry `My Cool Example` to the Example menu which loads | ||
the file from `Projects/my-cool-project/MyCustomProject/Demo1.lean`. | ||
|
||
You might want to look at the provided `mathlib-demo` project for comparison. |
Submodule lean4web-tools
deleted from
8be773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
import Webeditor | ||
import Mathlib | ||
import ProofWidgets | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name = "mathlibLatest" | ||
defaultTargets = ["MathlibLatest"] | ||
|
||
[[require]] | ||
name = "mathlib" | ||
git = "https://github.com/leanprover-community/mathlib4" | ||
rev = "master" | ||
|
||
[[lean_lib]] | ||
name = "MathlibLatest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
leanprover/lean4:v4.8.0-rc2 | ||
leanprover/lean4:v4.10.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.lake |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Operate in the directory where this file is located | ||
cd $(dirname $0) | ||
|
||
lake update -R | ||
lake build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{"version": "1.1.0", | ||
"packagesDir": ".lake/packages", | ||
"packages": [], | ||
"name": "stable", | ||
"lakeDir": ".lake"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Lake | ||
open Lake DSL | ||
|
||
package «stable» where | ||
-- add package configuration options here | ||
|
||
@[default_target] | ||
lean_lib «Stable» where | ||
-- add library configuration options here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
leanprover/lean4:stable |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.