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

Add playground #611

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ jobs:
run: |
./bin/ycat .github/workflows/go.yml

page:
name: page
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/playground/package-lock.json
- name: install dependencies
run: make -C ./docs/playground deps
- name: build
run: make -C ./docs/playground build

coverage:
name: Coverage
runs-on: ubuntu-latest
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deploy static content to Pages
on:
push:
tags:
- v*

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: 'pages'
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: docs/playground/package-lock.json
- name: install dependencies
run: make -C ./docs/playground deps
- name: build
run: make -C ./docs/playground build
- name: setup Pages
uses: actions/configure-pages@v4
- name: upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/playground/dist'
- name: deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions docs/playground/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
*.wasm
dist
8 changes: 8 additions & 0 deletions docs/playground/.vite/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hash": "a456637e",
"configHash": "358b79f2",
"lockfileHash": "c66b5dca",
"browserHash": "923911c5",
"optimized": {},
"chunks": {}
}
3 changes: 3 additions & 0 deletions docs/playground/.vite/deps/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
18 changes: 18 additions & 0 deletions docs/playground/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: build
build: build/wasm build/page

.PHONY: build/wasm
build/wasm:
GOOS=js GOARCH=wasm go build -o src/yaml.wasm ./cmd/yaml

.PHONY: build/page
build/page:
npm run build

.PHONY: deps
deps:
npm ci

.PHONY: dev
dev:
npm run dev
14 changes: 14 additions & 0 deletions docs/playground/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Playground

## Architecture

- Vite
- React
- TypeScript
- WebWorker
- WebAssembly
- Built with Go
- Components
- [Monaco Editor](https://microsoft.github.io/monaco-editor/)
- [Xterm.js](https://xtermjs.org/)
- [MUI](https://mui.com/)
Loading
Loading