Commit 224e438c by HoMeTown

feat: init

parents
* text=auto
*.* text eol=lf
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# Serverless directories
.serverless
# IDE
.idea
*.lerna_backup
_fixtures
.temp
.history
src/typegen.d.ts
.eslint-config-inspector
# Rsbuild Project
## Setup
Install the dependencies:
```bash
pnpm install
```
## Get Started
Start the dev server:
```bash
pnpm dev
```
Build the app for production:
```bash
pnpm build
```
Preview the production build locally:
```bash
pnpm preview
```
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
export default antfu({
react: true,
})
{
"name": "sdream-ai-fe",
"version": "1.0.0",
"private": true,
"description": "SDream AI",
"author": "HoMeTown",
"scripts": {
"dev": "rsbuild dev --open",
"build": "rsbuild build",
"preview": "rsbuild preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"typecheck": "tsc --noEmit",
"prepare": "simple-git-hooks"
},
"peerDependencies": {
"@eslint-react/eslint-plugin": "^1.5.8",
"@unocss/eslint-plugin": ">=0.50.0",
"eslint": ">=8.40.0",
"eslint-plugin-format": ">=0.1.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.4",
"svelte-eslint-parser": ">=0.37.0"
},
"peerDependenciesMeta": {
"@eslint-react/eslint-plugin": {
"optional": true
},
"@unocss/eslint-plugin": {
"optional": true
},
"astro-eslint-parser": {
"optional": true
},
"eslint-plugin-format": {
"optional": true
},
"eslint-plugin-react-hooks": {
"optional": true
},
"eslint-plugin-react-refresh": {
"optional": true
}
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@antfu/eslint-config": "^2.24.1",
"@eslint-react/eslint-plugin": "^1.8.0",
"@rsbuild/core": "1.0.1-beta.9",
"@rsbuild/plugin-react": "1.0.1-beta.9",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"eslint": "^9.8.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.9",
"lint-staged": "^15.2.7",
"simple-git-hooks": "^2.11.1",
"typescript": "^5.5.2"
},
"simple-git-hooks": {
"pre-commit": "pnpm lint-staged"
},
"lint-staged": {
"*": "eslint --fix"
}
}
packages:
- 'fixtures/*'
import { defineConfig } from '@rsbuild/core'
import { pluginReact } from '@rsbuild/plugin-react'
export default defineConfig({
plugins: [pluginReact()],
})
body {
margin: 0;
color: #fff;
font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
background-image: linear-gradient(to bottom, #020917, #101725);
}
.content {
display: flex;
min-height: 100vh;
line-height: 1.1;
text-align: center;
flex-direction: column;
justify-content: center;
}
.content h1 {
font-size: 3.6rem;
font-weight: 700;
}
.content p {
font-size: 1.2rem;
font-weight: 400;
opacity: 0.5;
}
import './App.css'
function App() {
return (
<div className="content">
<h1>Rsbuild with React</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
)
}
export default App
/// <reference types="@rsbuild/core/types" />
import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
const rootEl = document.getElementById('root')
if (rootEl) {
const root = ReactDOM.createRoot(rootEl)
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
)
}
{
"compilerOptions": {
"target": "ES2020",
"jsx": "react-jsx",
"lib": ["DOM", "ES2020"],
"useDefineForClassFields": true,
"module": "ESNext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"strict": true,
"noEmit": true,
"isolatedModules": true,
"skipLibCheck": true
},
"include": ["src"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment