Skip to content

Commit

Permalink
Strip down web (#351)
Browse files Browse the repository at this point in the history
* Tear down leftovers from old web demo

* Fix keywords in web editor
  • Loading branch information
timsueberkrueb authored Nov 6, 2024
1 parent 76623d3 commit 1cb231b
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 173 deletions.
4 changes: 4 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ make build

## Run

To run the web demo, execute the following command:

```sh
make run
```

Then, navigate to [http://localhost:9000/editor#example.pol](http://localhost:9000/editor#example.pol), where `example.pol` can be any file in the `examples` directory.

## License

The content in this folder is based on [tower-lsp-web-demo](https://github.com/silvanshade/tower-lsp-web-demo/) by Darin Morrison.
Expand Down
30 changes: 0 additions & 30 deletions web/packages/app/assets/demo.css

This file was deleted.

68 changes: 0 additions & 68 deletions web/packages/app/assets/demo.html

This file was deleted.

2 changes: 1 addition & 1 deletion web/packages/app/src/editor/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class Language implements monaco.languages.ILanguageExtensionPoin

private static syntaxDefinition(): monaco.languages.IMonarchLanguage {
return {
keywords: ["data", "codata", "impl", "def", "codef", "match", "comatch", "absurd"],
keywords: ["data", "codata", "let", "def", "codef", "match", "comatch", "absurd", "Type", "implicit", "use"],

typeKeywords: ["Type"],

Expand Down
28 changes: 0 additions & 28 deletions web/packages/app/src/tutorial/editor.ts

This file was deleted.

29 changes: 0 additions & 29 deletions web/packages/app/src/tutorial/highlight.ts

This file was deleted.

6 changes: 0 additions & 6 deletions web/packages/app/src/tutorial/index.ts

This file was deleted.

11 changes: 0 additions & 11 deletions web/packages/app/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ module.exports = (env, argv) => {
mode: "production",
target: "web",
entry: {
tutorial: "./src/tutorial/index.ts",
editor: "./src/editor/index.ts",
"editor.worker": "monaco-editor-core/esm/vs/editor/editor.worker.js",
},
Expand Down Expand Up @@ -109,22 +108,12 @@ module.exports = (env, argv) => {
new webpack.DefinePlugin({
DEBUG: !prod,
}),
new HtmlWebpackPlugin({
template: "assets/demo.html",
filename: "index.html",
chunks: ["tutorial"],
scriptLoading: "defer",
}),
new HtmlWebpackPlugin({
template: "assets/editor.html",
filename: "editor/index.html",
chunks: ["editor", "editor.worker"],
scriptLoading: "defer",
}),
// Watch all files in tutorial folder for changes
new WebpackWatchFilesPlugin({
files: ["./assets/tutorial/*"],
}),
],
optimization: {
minimize: prod,
Expand Down

0 comments on commit 1cb231b

Please sign in to comment.