Skip to content

Commit f1cb511

Browse files
committed
Add Tutorial
1 parent 36d84c7 commit f1cb511

20 files changed

Lines changed: 14973 additions & 0 deletions

.github/workflows/pages.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: true
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Check out repository
23+
uses: actions/checkout@v6
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: 22
29+
cache: npm
30+
cache-dependency-path: package-lock.json
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Check and build site
36+
run: |
37+
npm run check
38+
npm run build
39+
40+
- name: Configure GitHub Pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Upload GitHub Pages artifact
44+
uses: actions/upload-pages-artifact@v4
45+
with:
46+
path: dist/client
47+
48+
deploy:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# LiquidJava Interactive Tutorial
2+
3+
This repository contains a web-based, interactive introduction to LiquidJava. The tutorial has four short examples:
4+
5+
1. RGB value refinements;
6+
2. Midpoint method contracts;
7+
3. External socket state refinements;
8+
4. Stack ghost variables.
9+
10+
Learners can edit Java snippets, run lightweight in-browser checks, answer quick knowledge questions, and move freely between sections. The tutorial does not collect, persist, or export user data.
11+
12+
## Preview Locally
13+
14+
Run the local development server:
15+
16+
```sh
17+
npm run dev
18+
```
19+
20+
Then open `http://localhost:8000`.
21+
22+
## Examples
23+
24+
All tutorial content is in [`tutorial-data.js`](tutorial-data.js). The interface renders the lessons from that single configuration object.
25+
26+
Each lesson contains:
27+
28+
- Explanatory copy and a read-only example;
29+
- Starter and solution code;
30+
- Regular-expression checks for the coding task;
31+
- Automatically checked multiple-choice and short-answer questions.
32+
33+
Add, remove, or reorder lesson objects to change the tutorial without editing `app.js` or `index.html`.
34+
35+
## Checker Scope
36+
37+
The browser checker is intentionally lightweight: it recognizes the requested annotations and values but does not run the LiquidJava compiler. Use the LiquidJava VS Code extension for real verification tasks.

0 commit comments

Comments
 (0)