Skip to content

Commit 9597de8

Browse files
committed
first commit
1 parent 8dc8d7e commit 9597de8

28 files changed

Lines changed: 7014 additions & 0 deletions

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build and Deploy
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version: "1.22"
22+
check-latest: true
23+
24+
- name: Build WASM
25+
run: |
26+
cd wasm-build
27+
go mod tidy
28+
go get -u github.com/php-any/origami@main
29+
GOOS=js GOARCH=wasm go build -o ../public/wasm/origami.wasm .
30+
# Copy wasm_exec.js from GOROOT to public folder
31+
cp $(go env GOROOT)/misc/wasm/wasm_exec.js ../public/wasm_exec.js
32+
cd ..
33+
34+
- name: Setup Node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: "20"
38+
cache: "npm"
39+
40+
- name: Install Dependencies
41+
run: npm install
42+
43+
- name: Build Frontend
44+
run: npm run build
45+
46+
- name: Deploy to GitHub Pages
47+
uses: JamesIves/github-pages-deploy-action@v4
48+
with:
49+
folder: dist
50+
branch: gh-pages

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

App.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react';
2+
import { HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
3+
import Navbar from './components/Navbar';
4+
import Home from './pages/Home';
5+
import Docs from './pages/Docs';
6+
import Playground from './pages/Playground';
7+
import Showcase from './pages/Showcase';
8+
import { LanguageProvider } from './contexts/LanguageContext';
9+
10+
const App: React.FC = () => {
11+
return (
12+
<LanguageProvider>
13+
<Router>
14+
<div className="bg-origami-bg text-origami-text min-h-screen selection:bg-origami-cyan selection:text-black font-sans">
15+
<Navbar />
16+
<Routes>
17+
<Route path="/" element={<Home />} />
18+
<Route path="/docs" element={<Docs />} />
19+
<Route path="/playground" element={<Playground />} />
20+
<Route path="/showcase" element={<Showcase />} />
21+
<Route path="*" element={<Navigate to="/" replace />} />
22+
</Routes>
23+
</div>
24+
</Router>
25+
</LanguageProvider>
26+
);
27+
};
28+
29+
export default App;

0 commit comments

Comments
 (0)