grafana / play-thema

https://grafana.github.io/play-thema/
4 stars 1 forks source link

Thema Playground

Thema Playground is an online service that provides a safe and sandboxed environment for users to write and execute Thema code. Accessible via a web browser at grafana.github.io/play-thema, it eliminates the need for users to install Thema on their personal computers.

It is primarily designed for sharing and executing Thema snippets. It allows you to write Thema code, compile, and run it, with the output being displayed directly within the web interface. It's a particularly valuable tool for demonstrating the behavior of Thema code, seeking assistance with Thema-related challenges, or learning the intricacies of the Thema language, including its operations.

Development

Dependencies

To set up and run this project locally, you will need the following dependencies:

  1. Node.js
  2. Yarn
  3. Go

Running the project locally

  1. Clone the Thema Playground repository.

  2. Install the application dependencies:

    make deps
  3. Build the WASM artifact from the Go source code

    make wasm
  4. Run the application

    make start

    This will start the development server on localhost:3000.

Alternatively, after installing the necessary dependencies, you can run make run. This command performs steps 3 and 4 in a single operation.

Deployment

This project is deployed using GitHub Actions and served with GitHub Pages. Every push to the main branch triggers a GitHub Actions workflow, which builds the project and deploys it to the gh-pages branch.

You can check the ./github/workflows/deploy.yml file for more details about the deployment process.

Contributing

Pull requests are welcome.

For major changes, please open a GitHub Discussion to discuss what you would like to change.