From 1b226e4b48bb91389340fd7f9248606f24336c8e Mon Sep 17 00:00:00 2001 From: Stefan Date: Fri, 12 Jan 2024 09:10:04 +0100 Subject: [PATCH] feat: improved readme --- README.MD | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/README.MD b/README.MD index c01c799..d5a5c99 100644 --- a/README.MD +++ b/README.MD @@ -12,23 +12,24 @@ This project contains the code for the UVL playground, a small website that uses Compile a new UVLS executable for Linux from [source](https://github.com/Universal-Variability-Language/uvl-lsp) and replace `uvl-playground/WebSocketLanguageServer/lib/uvls` -### Locale Development +### Local Development -Install a recent version of node and npm, change in the `WebSocketLanguageServer` directory and execute `npm run start:dev`. +Install a recent version of node and npm, change in the `WebSocketLanguageServer` directory and execute `npm install` and `npm run start:dev`. ### Deploying -When your changes are added to the master branch, a github action takes care of the deployment. +When your changes are added to the master or dev branch, a github action takes care of the deployment. ## Website -### Locale Development +### Local Development -Install a recent version of node and npm, change to the `WebSocketClient` directory and execute `npm run dev`. +Install a recent version of node and npm, change to the `WebSocketClient` directory and execute `npm install` and `npm run dev`. +Hint: npm run dev includes running a shell script that only works under linux. However, this only copies style files to workaround a strange error in development mode of vite. Alternatively, you can run `npm run build` to build the website and then serve the content of `./WebSocketClient/dist` with a webserver of your choice. ### Deploying -When your changes are added to the master branch, a github action takes care of the deployment. +When your changes are added to the master or dev branch, a github action takes care of the deployment. ## Hosting on a different machine @@ -52,6 +53,39 @@ To change the machine on which the playground is hosted, you need to take the fo - run `docker compose up --build -d` - This will run the uvl playground behind a reverse proxy with letsencrypt certificates -# Hosting your own uvl playground without reverse proxy - -- Remove everything treafik related from the docker compose file +# Hosting your own uvl playground (locally) without letsencrypt + +- run `docker compose -f docker-compose-http.yaml up --build -d` + +# Directory structure + +## WebSocketClient + +- contains the website of the playground + +``` +WebSocketClient +├── assets //contains all relevant pictures as well as the example and tutorial feature models +├── dark_mode_dev_env.sh //hacky script to workaround vite dev error +├── dist //contains the production build +├── Dockerfile +├── index.html +├── node_modules +├── package.json +├── package-lock.json +├── src +│   ├── config.ts //configuration for ports etc. +│   ├── ImportExportFiles.ts //functionality for up- and download of files in the editor +│   ├── intro.ts //functionality for the playground tour +│   ├── main.ts +│   ├── util.ts //mainly for error handling +│   ├── uvlTutorial.ts //functionality for the UVL Tutorial (content is in assets folder) +│   └── vite-env.d.ts +├── style +│   ├── dropdown.css //styling for the example library drop down +│   ├── split.css //styling for the split pane +│   └── style.css +└── tsconfig.json +``` + +## WebSocketLanguageServer