Skip to content

Commit 0f5d6d6

Browse files
committed
Initialize Web Awesome site template
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
0 parents  commit 0f5d6d6

15 files changed

Lines changed: 1478 additions & 0 deletions

‎.copier-answers.yaml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changes here will be overwritten by Copier
2+
_commit: 690e994
3+
_src_path: https://github.com/python-project-templates/base.git
4+
add_extension: site-webawesome
5+
brand_name: Example
6+
github: python-project-templates
7+
project_description: A fast, accessible website built with Web Awesome.
8+
project_name: javascript-template-site-webawesome
9+
site_url: https://example.com

‎.github/workflows/build.yaml‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Build Status
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: [v*]
7+
pull_request:
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v7
18+
- uses: pnpm/action-setup@v6
19+
with:
20+
version: 11
21+
- uses: actions/setup-node@v7
22+
with:
23+
node-version: 22.x
24+
cache: pnpm
25+
- run: pnpm install
26+
- run: pnpm build
27+
- run: pnpm check
28+
- run: pnpm lint
29+
- run: pnpm exec playwright install --with-deps chromium
30+
- run: pnpm test:e2e
31+
env:
32+
CI: '1'

‎.gitignore‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
/dist
3+
/coverage
4+
/playwright-report
5+
/test-results
6+
.env
7+
.env.*
8+
!.env.example
9+
.DS_Store

‎.oxfmtrc.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 120,
4+
"semi": true,
5+
"singleQuote": true,
6+
"tabWidth": 2,
7+
"trailingComma": "none",
8+
"sortPackageJson": false,
9+
"ignorePatterns": [".copier-answers.yaml", "coverage/**", "dist/**", "playwright-report/**", "test-results/**"]
10+
}

‎.oxlintrc.json‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"env": {
4+
"browser": true,
5+
"es6": true,
6+
"node": true
7+
}
8+
}

‎README.md‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Example
2+
3+
A fast, accessible website built with Web Awesome.
4+
5+
## Develop
6+
7+
```bash
8+
pnpm install
9+
pnpm dev
10+
```
11+
12+
## Verify
13+
14+
```bash
15+
pnpm check
16+
pnpm lint
17+
pnpm test
18+
pnpm build
19+
```
20+
21+
The application uses [Web Awesome](https://webawesome.com/) components with Vite and TypeScript.

‎index.html‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta name="description" content="A fast, accessible website built with Web Awesome." />
7+
<meta name="theme-color" content="#ffffff" />
8+
<meta property="og:site_name" content="Example" />
9+
<meta property="og:type" content="website" />
10+
<meta property="og:title" content="Example" />
11+
<meta property="og:description" content="A fast, accessible website built with Web Awesome." />
12+
<meta property="og:url" content="https://example.com" />
13+
<link rel="canonical" href="https://example.com/" />
14+
<title>Example</title>
15+
</head>
16+
<body>
17+
<main>
18+
<p class="eyebrow">Example</p>
19+
<h1>javascript-template-site-webawesome</h1>
20+
<p>A fast, accessible website built with Web Awesome.</p>
21+
<wa-button variant="brand">Get started</wa-button>
22+
</main>
23+
<script type="module" src="/src/main.ts"></script>
24+
</body>
25+
</html>

‎package.json‎

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "javascript-template-site-webawesome",
3+
"version": "0.1.0",
4+
"description": "A fast, accessible website built with Web Awesome.",
5+
"private": true,
6+
"packageManager": "pnpm@11.9.0",
7+
"engines": {
8+
"node": ">=22"
9+
},
10+
"type": "module",
11+
"scripts": {
12+
"dev": "vite dev",
13+
"build": "vite build",
14+
"preview": "vite preview",
15+
"check": "tsc --noEmit",
16+
"lint": "oxlint . && oxfmt --check .",
17+
"fix": "oxlint --fix . && oxfmt --write .",
18+
"test": "pnpm test:e2e",
19+
"test:e2e": "playwright test",
20+
"test:e2e:update": "playwright test --update-snapshots"
21+
},
22+
"dependencies": {
23+
"@awesome.me/webawesome": "^3.11.0"
24+
},
25+
"devDependencies": {
26+
"@axe-core/playwright": "^4.12.1",
27+
"@playwright/test": "^1.60.0",
28+
"@types/node": "^24.0.0",
29+
"oxfmt": "^0.63.0",
30+
"oxlint": "^1.78.0",
31+
"typescript": "^5.9.3",
32+
"vite": "^8.1.5"
33+
}
34+
}

‎playwright.config.ts‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineConfig, devices } from '@playwright/test';
2+
3+
export default defineConfig({
4+
testDir: 'tests',
5+
fullyParallel: true,
6+
forbidOnly: !!process.env.CI,
7+
retries: process.env.CI ? 2 : 0,
8+
reporter: process.env.CI ? 'github' : 'list',
9+
use: {
10+
baseURL: 'http://127.0.0.1:4177',
11+
trace: 'retain-on-failure',
12+
screenshot: 'only-on-failure'
13+
},
14+
webServer: {
15+
command: 'vite build && vite preview --host 127.0.0.1 --port 4177 --strictPort',
16+
port: 4177,
17+
reuseExistingServer: !process.env.CI,
18+
timeout: 120_000
19+
},
20+
projects: [
21+
{
22+
name: 'desktop',
23+
use: { ...devices['Desktop Chrome'], viewport: { width: 1280, height: 800 } }
24+
}
25+
]
26+
});

0 commit comments

Comments
 (0)