Skip to content

Commit 835b846

Browse files
Merge pull request #18 from Bronze-Scouting-Company/chore/setup-bun-workspace
Chore/setup bun workspace
2 parents 4887c79 + cf2ced9 commit 835b846

21 files changed

Lines changed: 917 additions & 231 deletions

.github/workflows/checks.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
checks:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
12+
- name: Setup Bun
13+
uses: oven-sh/setup-bun@v2
14+
with:
15+
bun-version: 'latest'
16+
17+
- name: Install dependencies
18+
run : bun install
19+
20+
- name: Checks
21+
run: bun checks:ci
22+
23+
build:
24+
runs-on: ubuntu-latest
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Setup Bun
30+
uses: oven-sh/setup-bun@v2
31+
with:
32+
bun-version: 'latest'
33+
34+
- name: Install dependencies
35+
run : bun install
36+
37+
- name: Build
38+
run: bun run build

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
.env

.idea/biome.xml

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

backend/package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"name": "backend",
3-
"scripts": {
4-
"dev": "bun run --hot src/index.ts"
5-
},
6-
"dependencies": {
7-
"hono": "^4.9.9"
8-
},
9-
"devDependencies": {
10-
"@types/bun": "latest"
11-
}
12-
}
2+
"name": "backend",
3+
"scripts": {
4+
"dev": "bun run --hot src/index.ts",
5+
"build": "bun build src/index.ts --compiler --outdir dist",
6+
"start": "bun run dist/index.js"
7+
},
8+
"dependencies": {
9+
"hono": "^4.9.9"
10+
},
11+
"devDependencies": {
12+
"@types/bun": "latest"
13+
}
14+
}

backend/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Hono } from 'hono'
1+
import { Hono } from "hono";
22

3-
const app = new Hono()
3+
const app = new Hono();
44

5-
app.get('/', (c) => {
6-
return c.text('Hello BEC!')
7-
})
5+
app.get("/", (c) => {
6+
return c.text("Hello BEC!");
7+
});
88

9-
app.get('/health', (c) => c.text('OK'))
9+
app.get("/health", (c) => c.text("OK"));
1010

11-
export default app
11+
export default app;

backend/tsconfig.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
2-
"compilerOptions": {
3-
"strict": true,
4-
"jsx": "react-jsx",
5-
"jsxImportSource": "hono/jsx"
6-
}
7-
}
2+
"extends": "../tsconfig.base.json",
3+
"compilerOptions": {
4+
"strict": true,
5+
"jsx": "react-jsx",
6+
"jsxImportSource": "hono/jsx"
7+
}
8+
}

biome.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"linter": {
3+
"enabled": true,
4+
"rules": {
5+
"recommended": true
6+
}
7+
},
8+
"formatter": {
9+
"lineWidth": 120,
10+
"indentStyle": "space",
11+
"indentWidth": 6
12+
}
13+
}

bun.lock

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

frontend/eslint.config.js

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
1-
import js from '@eslint/js'
2-
import globals from 'globals'
3-
import reactHooks from 'eslint-plugin-react-hooks'
4-
import reactRefresh from 'eslint-plugin-react-refresh'
5-
import tseslint from 'typescript-eslint'
1+
import js from "@eslint/js";
2+
import reactHooks from "eslint-plugin-react-hooks";
3+
import reactRefresh from "eslint-plugin-react-refresh";
4+
import globals from "globals";
5+
import tseslint from "typescript-eslint";
66

77
export default tseslint.config(
8-
{ ignores: ['dist'] },
9-
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
12-
languageOptions: {
13-
ecmaVersion: 2020,
14-
globals: globals.browser,
15-
},
16-
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
19-
},
20-
rules: {
21-
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
24-
{ allowConstantExport: true },
25-
],
26-
},
27-
},
28-
)
8+
{ ignores: ["dist"] },
9+
{
10+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11+
files: ["**/*.{ts,tsx}"],
12+
languageOptions: {
13+
ecmaVersion: 2020,
14+
globals: globals.browser,
15+
},
16+
plugins: {
17+
"react-hooks": reactHooks,
18+
"react-refresh": reactRefresh,
19+
},
20+
rules: {
21+
...reactHooks.configs.recommended.rules,
22+
"react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
23+
},
24+
},
25+
);

frontend/package.json

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
11
{
2-
"name": "frontend",
3-
"private": true,
4-
"version": "0.0.0",
5-
"type": "module",
6-
"scripts": {
7-
"dev": "bunx --bun vite",
8-
"build": "tsc -b && vite build",
9-
"lint": "eslint .",
10-
"preview": "vite preview"
11-
},
12-
"dependencies": {
13-
"react": "^19.0.0",
14-
"react-dom": "^19.0.0"
15-
},
16-
"devDependencies": {
17-
"@eslint/js": "^9.21.0",
18-
"@types/react": "^19.0.10",
19-
"@types/react-dom": "^19.0.4",
20-
"@vitejs/plugin-react": "^4.3.4",
21-
"eslint": "^9.21.0",
22-
"eslint-plugin-react-hooks": "^5.1.0",
23-
"eslint-plugin-react-refresh": "^0.4.19",
24-
"globals": "^15.15.0",
25-
"typescript": "~5.7.2",
26-
"typescript-eslint": "^8.24.1",
27-
"vite": "^6.2.0"
28-
}
2+
"name": "frontend",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "bunx --bun vite",
8+
"build": "tsc -b && vite build",
9+
"lint": "eslint .",
10+
"preview": "vite preview"
11+
},
12+
"dependencies": {
13+
"react": "^19.0.0",
14+
"react-dom": "^19.0.0"
15+
},
16+
"devDependencies": {
17+
"@eslint/js": "^9.21.0",
18+
"@types/react": "^19.0.10",
19+
"@types/react-dom": "^19.0.4",
20+
"@vitejs/plugin-react": "^4.3.4",
21+
"eslint": "^9.21.0",
22+
"eslint-plugin-react-hooks": "^5.1.0",
23+
"eslint-plugin-react-refresh": "^0.4.19",
24+
"globals": "^15.15.0",
25+
"typescript-eslint": "^8.24.1",
26+
"vite": "^6.2.0"
27+
}
2928
}

0 commit comments

Comments
 (0)