Skip to content

Commit d964833

Browse files
committed
Initialize Lightning Timer SvelteKit project
1 parent 0ebf78e commit d964833

14 files changed

Lines changed: 2689 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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-and-deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 22
31+
cache: npm
32+
33+
- name: Install dependencies
34+
run: npm ci
35+
36+
- name: Check project
37+
run: npm run check
38+
39+
- name: Build static site
40+
run: npm run build
41+
env:
42+
BASE_PATH: /lightningtimer
43+
44+
- name: Configure Pages
45+
uses: actions/configure-pages@v5
46+
47+
- name: Upload Pages artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: build
51+
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
.svelte-kit/
3+
build/
4+
.env
5+
.env.*
6+
!.env.example
7+
.DS_Store

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,45 @@
1-
# lightningtimer
1+
# Lightning Timer
2+
3+
A focused, full-screen countdown timer for lightning talks, built as a static SvelteKit app.
4+
5+
## Features
6+
7+
- Configurable duration with quick 3, 5, 7, and 10 minute presets
8+
- Viewport-filling countdown display
9+
- Yellow numerals for the final minute
10+
- Red numerals for the final 15 seconds
11+
- Red background with black numerals when time expires
12+
- Start, pause, resume, reset, and full-screen controls
13+
- Keyboard shortcuts: `Space` to start/pause, `R` to reset, and `S` to set the duration
14+
- Saves the selected duration in local storage
15+
16+
## Development
17+
18+
```sh
19+
npm install
20+
npm run dev
21+
```
22+
23+
## Build
24+
25+
```sh
26+
npm run check
27+
npm run build
28+
```
29+
30+
The static site is generated in `build/`.
31+
32+
## GitHub Pages deployment
33+
34+
The workflow in `.github/workflows/deploy.yml` checks, builds, and deploys the app whenever `main` is pushed. It configures SvelteKit's base path as `/lightningtimer`, so assets work at:
35+
36+
<https://idan.github.io/lightningtimer/>
37+
38+
To enable the first deployment:
39+
40+
1. Push this repository to GitHub.
41+
2. Open **Settings → Pages** in the repository.
42+
3. Under **Build and deployment**, select **GitHub Actions** as the source.
43+
4. Open the **Actions** tab to monitor the deployment.
44+
45+
You can also run the workflow manually from **Actions → Deploy to GitHub Pages → Run workflow**.

jsconfig.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "./.svelte-kit/tsconfig.json",
3+
"compilerOptions": {
4+
"allowJs": true,
5+
"checkJs": true,
6+
"esModuleInterop": true,
7+
"forceConsistentCasingInFileNames": true,
8+
"resolveJsonModule": true,
9+
"skipLibCheck": true,
10+
"sourceMap": true,
11+
"strict": true,
12+
"moduleResolution": "bundler",
13+
"types": ["vite/client"]
14+
}
15+
}

0 commit comments

Comments
 (0)