Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev playground with monaco-editor #1

Merged
merged 31 commits into from
Jan 11, 2024
Merged

Dev playground with monaco-editor #1

merged 31 commits into from
Jan 11, 2024

Conversation

gdamjan
Copy link
Contributor

@gdamjan gdamjan commented Dec 28, 2023

The playground should work both locally (pnpm play) and on github pages. Currently published at https://irclogs.github.io/api/. Based on monaco-editor, loads the types of the api and the library, so that you can write typescript and it will run in the browser.

The CouchDB database will allow cross-origin access from the https://irclogs.github.io and http://localhost:8000 Origins.

ps.
don't use the snippet here:
https://www.typescriptlang.org/dev/sandbox/

gives you millennia old monaco and typescript.

- `pnpm play` will run the playground locally
- it will be published on github pages automatically too
@gdamjan gdamjan changed the title Playground Dev playground with monaco-editor Dec 28, 2023
@gdamjan
Copy link
Contributor Author

gdamjan commented Dec 28, 2023

TODO:

  • load types in the editor
  • get generated javascript code
  • run javascript code
  • probably allow loading other npm packages (works for running, but not for types)
  • store latest edit in localstorage

now it knows the type of CouchDB

had to change the uri of the model so it looks for files in the virtual
file:/// path
@gdamjan
Copy link
Contributor Author

gdamjan commented Jan 1, 2024

@gdamjan gdamjan marked this pull request as ready for review January 11, 2024 12:12
.github/workflows/playground.yml Outdated Show resolved Hide resolved
playground/index.html Outdated Show resolved Hide resolved
@gdamjan gdamjan merged commit 612d1c8 into main Jan 11, 2024
1 check passed
@gdamjan gdamjan deleted the playground branch January 11, 2024 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant