Skip to content

Commit b55b954

Browse files
committed
Migrate to Deno, Tailwind v4, daisyUI v5 and other improvements
1 parent b7d1ad5 commit b55b954

24 files changed

+4179
-8753
lines changed

.github/workflows/fleek.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy to Fleek
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
env:
13+
FLEEK_TOKEN: ${{ secrets.FLEEK_TOKEN }}
14+
FLEEK_PROJECT_ID: ${{ secrets.FLEEK_PROJECT_ID }}
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Runtime
21+
uses: denoland/setup-deno@v2
22+
with:
23+
deno-version: v2.x
24+
25+
- name: Install dependencies
26+
run: deno install
27+
28+
- name: Build
29+
run: deno task build
30+
31+
- name: Install Fleek CLI
32+
run: npm i -g @fleek-platform/cli
33+
34+
- name: Build & deploy sites
35+
run: fleek sites deploy
Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,47 +8,43 @@ on:
88

99
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
1010
permissions:
11-
pages: write # to deploy to Pages
12-
id-token: write # to verify the deployment originates from an appropriate source
11+
pages: write
12+
id-token: write
1313

1414
concurrency:
1515
group: pages
1616
cancel-in-progress: true
1717

1818
jobs:
19-
# Deploy to the github-pages environment
2019
deploy:
20+
runs-on: ubuntu-latest
2121
environment:
2222
name: github-pages
2323
url: ${{ steps.deployment.outputs.page_url }}
2424

25-
# Specify runner + deployment steps
26-
runs-on: ubuntu-latest
2725
steps:
2826
- name: Checkout
2927
uses: actions/checkout@v4
3028

31-
- name: Setup PNPM
32-
uses: pnpm/action-setup@v2
33-
34-
- name: Set up Node
35-
uses: actions/setup-node@v4
29+
- name: Setup Runtime
30+
uses: denoland/setup-deno@v2
3631
with:
37-
node-version: 20
38-
cache: 'pnpm'
32+
deno-version: v2.x
3933

4034
- name: Install dependencies
41-
run: pnpm install
35+
run: deno install
4236

4337
- name: Build
44-
run: pnpm run build
38+
run: deno task build
39+
env:
40+
BASE_URL: ${{ vars.BASE_URL }}
4541

4642
- name: Create subpages
4743
run: |
48-
mkdir dist/add dist/multiply dist/convert
49-
cp dist/index.html dist/add
50-
cp dist/index.html dist/multiply
51-
cp dist/index.html dist/convert
44+
mkdir dist/add dist/multiply dist/convert
45+
cp dist/index.html dist/add
46+
cp dist/index.html dist/multiply
47+
cp dist/index.html dist/convert
5248
5349
- name: Setup Pages
5450
uses: actions/configure-pages@v3
@@ -59,5 +55,5 @@ jobs:
5955
path: './dist'
6056

6157
- name: Deploy to GitHub Pages
58+
uses: actions/deploy-pages@v2
6259
id: deployment
63-
uses: actions/deploy-pages@v2 # or the latest "vX.X.X" version tag for this action

.vscode/settings.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
// "editor.formatOnSave": true,
3-
"editor.formatOnSaveMode": "modificationsIfAvailable",
2+
"[typescript]": { "editor.defaultFormatter": "denoland.vscode-deno" },
3+
"deno.enable": false,
4+
"deno.lint": true,
45
"typescript.tsdk": "node_modules/typescript/lib",
56
"yaml.schemas": {
67
"https://json.schemastore.org/github-workflow.json": "file:///Users/kuchta/Projects/radixverse/.github/workflows/deploy.yml"
78
},
9+
"editor.formatOnSaveMode": "modificationsIfAvailable",
10+
"typescript.tsserver.experimental.enableProjectDiagnostics": false
811
}

deno.jsonc

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "@kuchta/radixverse",
3+
"version": "0.0.4",
4+
"exports": "./src/utils.ts",
5+
"nodeModulesDir": "auto",
6+
"tasks": {
7+
"start": "deno run -A npm:vite --host",
8+
"preview": "deno run -A npm:vite preview",
9+
"check": "deno check src/**/*.ts src/**/*.tsx",
10+
"lint": "deno lint",
11+
"test": "deno test",
12+
"build": "deno run -A npm:vite build",
13+
"pre-commit": "deno task lint && deno task test && deno task build"
14+
},
15+
"publish": {
16+
"include": [
17+
"README.md",
18+
"deno.json",
19+
"package.json",
20+
"src/utils.ts"
21+
]
22+
},
23+
"include": [ "src/**/*.ts", "src/**/*.tsx" ],
24+
"unstable": [ "sloppy-imports" ],
25+
"lint": {
26+
"include": ["src/"],
27+
"rules": {
28+
"tags": [ "recommended" ],
29+
"exclude": [
30+
"no-cond-assign",
31+
"no-sloppy-imports"
32+
]
33+
}
34+
},
35+
"compilerOptions": {
36+
"jsx": "react-jsx",
37+
"lib": [ "ESNext", "DOM", "DOM.Iterable" ],
38+
"noFallthroughCasesInSwitch": true,
39+
"strict": true,
40+
"types": [ "node", "vite/client" ]
41+
}
42+
}

0 commit comments

Comments
 (0)