Skip to content

Commit

Permalink
core: init
Browse files Browse the repository at this point in the history
  • Loading branch information
vgseven committed Jul 30, 2024
0 parents commit ad31644
Show file tree
Hide file tree
Showing 29 changed files with 3,848 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build

on:
push:
branches:
- "**"
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install

- name: Performing Type Check
run: pnpm run type-check

- name: Performing Lint
run: pnpm run lint

- name: Performing Format
run: pnpm run format

- name: Performing Build
run: pnpm run build
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Logs
pnpm-debug.log*

# Dependencies
node_modules
dist
*.local

# Logs
vite.config.js
tsconfig.node.tsbuildinfo
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pnpm run type-check
pnpm run lint
pnpm run format
pnpm run build
6 changes: 6 additions & 0 deletions .vscode/extension.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"biomejs.biome",
"redhat.vscode-yaml"
]
}
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"editor.defaultFormatter": "biomejs.biome",
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# React Essential

React.js Essential - An Essential Template to build an modern react.js application with all the essentials included.

## Getting Started

#### Radium - [Install Radium CLI](https://github.com/radiumlabs/radium)

`radium` is an CLI tool to initialize any project. It'll install dependencies, initialize as git repository, and prepare your project for development.

```bash
radium init --with
```
```bash
enter the name of project and url of this template
```
> `radium` cli will initialize your project with this template and install dependencies, initialize as git repository and prepare your project for development.
## Features

- ✨ Library: [React.js](https://reactjs.org/)
- 🚀 Styling: [Tailwind CSS](https://tailwindcss.com/)
- 💻 Language: [TypeScript](https://www.typescriptlang.org/)
- 🧹 Linting and Formatting: [Biome.js](https://biomejs.dev/)
- 🎨 Themes: [Next Themes](https://github.com/pacocoursey/next-themes)
- 💄 Icons: [Radix-Icon](https://www.radix-ui.com/icons)
- 🚀 Routing: [Tanstack React Router](https://tanstack.com/router/)
- ✨ Heading: [Unheaded](https://github.com/unjs/unhead)
- ⚙️ Build: Github Actions
- 🛠 Commit: [Husky](https://typicode.github.io/husky/)

## Contribute.

Contributions are always welcome! Please submit a pull request or open an issue to discuss your ideas.
99 changes: 99 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"formatter": {
"enabled": true,
"formatWithErrors": false,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf",
"attributePosition": "auto",
"ignore": [
".vscode",
".next",
".vercel",
".env",
".changeset",
".husky",
"node_modules",
"build",
"dist",
"routeTree.gen.ts"
]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"correctness": {
"noUnusedVariables": "warn"
},
"style": {
"recommended": true
},
"complexity": {
"recommended": true
},
"performance": {
"recommended": true
},
"suspicious": {
"recommended": true
},
"a11y": {
"recommended": true
},
"security": {
"recommended": true
}
},
"ignore": [
".vscode",
".next",
".vercel",
".env",
".changeset",
".husky",
"node_modules",
"build",
"dist",
"routeTree.gen.ts"
]
},
"javascript": {
"formatter": {
"jsxQuoteStyle": "double",
"quoteProperties": "asNeeded",
"trailingCommas": "es5",
"semicolons": "always",
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteStyle": "double",
"attributePosition": "auto"
}
},
"css": {
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf",
"quoteStyle": "double"
}
},
"json": {
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80,
"lineEnding": "lf",
"trailingCommas": "none"
}
}
}
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>

</html>
45 changes: 45 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "react-essential",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "biome lint --write .",
"format": "biome format --write .",
"type-check": "tsc --noEmit",
"clean": "pnpm rimraf node_modules && pnpm rimraf .next",
"prepare": "husky",
"build:prepare": "pnpm run type-check && pnpm run lint && pnpm run format && pnpm run build"
},
"dependencies": {
"@radix-ui/react-icons": "^1.3.0",
"@tanstack/react-router": "^1.45.14",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"next-themes": "^0.3.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.4.0",
"tailwindcss-animate": "^1.0.7",
"unhead": "^1.9.16"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@changesets/cli": "^2.27.7",
"@tanstack/router-plugin": "^1.45.13",
"@tanstack/router-vite-plugin": "^1.45.13",
"@types/node": "^22.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"husky": "^9.1.4",
"postcss": "^8.4.40",
"rimraf": "^6.0.1",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4",
"vite": "^5.3.5"
}
}
Loading

0 comments on commit ad31644

Please sign in to comment.