Skip to content

Commit 01ed374

Browse files
authored
Merge pull request #9 from abhishekg999/ahh/v2
init
2 parents 2490f07 + 3b9d0c9 commit 01ed374

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2840
-1508
lines changed

.github/workflows/deploy.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Bun
25+
uses: oven-sh/setup-bun@v2
26+
with:
27+
bun-version: 1.2.23
28+
29+
- name: Install dependencies
30+
run: bun install --frozen-lockfile
31+
32+
- name: Build
33+
run: bun run build
34+
35+
- name: Fix 404 for GH Pages
36+
run: cp dist/index.html dist/404.html
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: dist
42+
43+
deploy:
44+
needs: build
45+
runs-on: ubuntu-latest
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deploy.outputs.page_url }}
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deploy
52+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
#ignore python testing
2-
*.py
1+
node_modules/
2+
dist/
3+
*.log
4+
.DS_Store
5+
bun.lockb

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
dist
3+
old
4+
*.log
5+
bun.lockb
6+
*.json
7+
src/data/
8+

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": false,
4+
"tabWidth": 2,
5+
"trailingComma": "es5",
6+
"printWidth": 100,
7+
"arrowParens": "always"
8+
}

build.ts

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { cp, mkdir, rm } from "node:fs/promises";
2+
3+
const outdir = "./dist";
4+
5+
async function build() {
6+
console.log("Building Touchdown...");
7+
8+
try {
9+
console.log("Cleaning dist directory...");
10+
await rm(outdir, { recursive: true, force: true });
11+
await mkdir(outdir, { recursive: true });
12+
13+
console.log("Bundling application...");
14+
const result = await Bun.build({
15+
entrypoints: ["./src/index.html"],
16+
outdir,
17+
sourcemap: "external",
18+
target: "browser",
19+
minify: true,
20+
splitting: true,
21+
});
22+
23+
if (!result.success) {
24+
console.error("Build failed:");
25+
for (const log of result.logs) {
26+
console.error(log);
27+
}
28+
process.exit(1);
29+
}
30+
31+
console.log("Copying public assets...");
32+
await cp("./public", outdir, { recursive: true });
33+
34+
console.log("Build complete!");
35+
console.log(`Output: ${outdir}`);
36+
console.log(`Files: ${result.outputs.length} bundles`);
37+
} catch (error) {
38+
console.error("Build failed:", error);
39+
process.exit(1);
40+
}
41+
}
42+
43+
build();

bun.lock

Lines changed: 179 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bunfig.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[install]
2+
peer = true

index.html

Lines changed: 0 additions & 267 deletions
This file was deleted.

loading-bar.min.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)