Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Rsbuild template repository
# Bun React template repository

This is a template repository for `rsbuild` with `React` and `TypeScript`. It uses `bun` instead of Node.js and `biome` instead of `prettier / eslint` for better performance.
This is a template repository for `React` and `TypeScript` built with Bun. It uses `bun` instead of Node.js and `biome` instead of `prettier / eslint` for better performance.

## Start a new project from this template

1. Copy / Fork / Clone the repository
2. Change the license in the `LICENSE` file and in the `package.json` file
3. Update `assetPrefix` in `rsbuild.config.ts` to your repository name
4. Update `title` in `rsbuild.config.ts` to your project name
5. Install the dependencies via `bun install`
6. Update or remove `.github/workflows/sync-to-gitlab.yml` if you want to sync to GitLab
7. Update this `README.md` file
3. Update `src/index.html` title to your project name
4. Install the dependencies via `bun install`
5. Update or remove `.github/workflows/sync-to-gitlab.yml` if you want to sync to GitLab
6. Update this `README.md` file

## Setup

Expand Down
3 changes: 1 addition & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
},
"css": {
"parser": {
"cssModules": true,
"tailwindDirectives": true
"cssModules": true
}
},
"formatter": {
Expand Down
152 changes: 1 addition & 151 deletions bun.lock
100644 → 100755

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "rsbuild-react-bun-biome-starter-template",
"name": "react-spa-starter-template",
"version": "1.0.0",
"private": true,
"license": "Apache-2.0",
"type": "module",
"scripts": {
"build": "rsbuild build",
"build": "bun build src/index.html --outdir dist",
"check": "bun run check:format && bun run check:tsc",
"check:format": "biome check --write",
"check:tsc": "tsc --noEmit",
"dev": "rsbuild dev --open",
"dev": "bun --hot src/index.html",
"format": "biome format --write",
"preview": "rsbuild preview"
"preview": "bun run build && bun dist/index.html"
},
"dependencies": {
"@picocss/pico": "^2.1.1",
Expand All @@ -22,13 +22,9 @@
},
"devDependencies": {
"@biomejs/biome": "^2.4.13",
"@rsbuild/core": "^2.0.3",
"@rsbuild/plugin-react": "^2.0.0",
"@tailwindcss/postcss": "^4.2.4",
"@tsconfig/bun": "^1.0.10",
"@types/bun": "1.3.13",
"@types/react-dom": "^19.2.3",
"tailwindcss": "^4.2.4",
"typescript": "^6.0.3"
}
}
5 changes: 0 additions & 5 deletions postcss.config.mjs

This file was deleted.

18 changes: 0 additions & 18 deletions rsbuild.config.ts

This file was deleted.

6 changes: 5 additions & 1 deletion src/App.css
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
@import "tailwindcss";
.page {
max-width: 48rem;
margin: 0 auto;
padding: 4rem 1.5rem;
}
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import './App.css'

export default function App() {
return (
<main className="p-10">
<h1>Rsbuild with React</h1>
<p>Start building amazing things with Rsbuild.</p>
<main className="page">
<h1>Bun with React</h1>
<p>Start building amazing things with Bun.</p>
</main>
)
}
1 change: 0 additions & 1 deletion src/env.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
declare module '*.css'
12 changes: 12 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Prototype</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="./index.tsx"></script>
</body>
</html>