-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from sj-distributor/53-todo-add-zustand-template
Todo: add zustand template
- Loading branch information
Showing
39 changed files
with
4,555 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
import { green, yellow } from "kolorist"; | ||
import { bgBlack, green, yellow } from "kolorist"; | ||
|
||
import { Boilerplate } from "./types"; | ||
|
||
export const boilerplates: Boilerplate[] = [ | ||
{ | ||
name: "react-recoil", | ||
display: "TypeScript + Recoil", | ||
color: yellow, | ||
display: "Recoil + TypeScript", | ||
color: green, | ||
}, | ||
{ | ||
name: "react-ts", | ||
display: "TypeScript", | ||
color: green, | ||
color: bgBlack, | ||
}, | ||
{ | ||
name: "react-zustand", | ||
display: "Zustand + TypeScript", | ||
color: yellow, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# For more information about the properties used in | ||
# this file, please see the EditorConfig documentation: | ||
# https://editorconfig.org/ | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"root": true, | ||
"env": { "browser": true, "es2020": true, "node": true }, | ||
"extends": ["plugin:@sj-distributor/react/recommended"], | ||
"ignorePatterns": ["dist", ".eslintrc.json"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["react-refresh"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.json | ||
.history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"esbenp.prettier-vscode", | ||
"bradlc.vscode-tailwindcss", | ||
"EditorConfig.EditorConfig", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# React TS Boilerplate | ||
|
||
## Technology Stack | ||
|
||
- [Vite](https://vitejs.dev): Efficient build tool for modern browsers. | ||
- [React](https://reactjs.org): JavaScript library for building user interfaces. | ||
- [TypeScript](https://www.typescriptlang.org): Superset of JavaScript with static type-checking. | ||
- [ReactRouter](https://reactrouter.com/docs/en/v6): Navigation library for React applications. | ||
- [Axios](https://axios-http.com/): Promise-based HTTP client for the browser and Node.js. | ||
- [Ramda](https://ramdajs.com/): Functional programming library for JavaScript. | ||
- [ahooks](https://ahooks.js.org/): Collection of React Hooks for common tasks. | ||
- [Zustand](https://zustand-demo.pmnd.rs/): Small, fast and scaleable bearbones state-management solution. | ||
|
||
## Quick Start | ||
|
||
Install project dependencies | ||
|
||
``` | ||
pnpm install | ||
``` | ||
|
||
Launch the app, it will become available at [http://localhost:3000](http://localhost:3000/) | ||
|
||
``` | ||
pnpm dev | ||
``` | ||
|
||
## Project Standards | ||
|
||
- xxx | ||
- xxx | ||
- xxx | ||
|
||
## Directory Structure | ||
|
||
`├──`[`.vscode`](.vscode) — VSCode settings including code snippets, recommended extensions etc<br> | ||
`├──`[`public`](./public) — Static assets such as robots.txt, index.html etc<br> | ||
`├──`[`src/assets`](./src/assets) — Static assets<br> | ||
`├──`[`src/components`](./src/components) — React public components<br> | ||
`├──`[`src/hooks`](./src/hooks) — React public hooks<br> | ||
`├──`[`src/models`](./src/hooks) — Status Management<br> | ||
`├──`[`src/pages`](./src/pages) — Application and page (screen) components<br> | ||
`├──`[`src/routes`](./src/routes) — Application routes components<br> | ||
`├──`[`src/theme`](./src/services) — External connection service<br> | ||
`├──`[`src/utils`](./src/utils) — Utility functions<br> | ||
|
||
## Recommended VSCode Extensions | ||
|
||
- [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss): IntelliSense for Tailwind CSS. | ||
- [Prettier - Code formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode&ssr=false#overview): Code formatting tool. | ||
- [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig): Editor configuration consistency. | ||
|
||
## Coding Conventions | ||
|
||
- Check [here](https://github.com/sj-distributor/react-coding-conventions). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vite + React + TS</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "template-react-zustand", | ||
"private": true, | ||
"version": "0.0.0", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"ahooks": "^3.7.10", | ||
"axios": "^1.6.7", | ||
"ramda": "^0.29.1", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-router-dom": "^6.22.0", | ||
"zustand": "^4.5.0" | ||
}, | ||
"devDependencies": { | ||
"@sj-distributor/eslint-plugin-react": "^0.7.1", | ||
"@types/ramda": "^0.29.10", | ||
"@types/react": "^18.2.55", | ||
"@types/react-dom": "^18.2.19", | ||
"@typescript-eslint/eslint-plugin": "^6.21.0", | ||
"@typescript-eslint/parser": "^6.21.0", | ||
"@vitejs/plugin-react": "^4.2.1", | ||
"autoprefixer": "^10.4.17", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"eslint-plugin-react-refresh": "^0.4.5", | ||
"eslint-plugin-simple-import-sort": "^12.0.0", | ||
"eslint-plugin-unicorn": "^51.0.1", | ||
"postcss": "^8.4.35", | ||
"prettier": "^3.2.5", | ||
"typescript": "^5.2.2", | ||
"typescript-plugin-css-modules": "^5.1.0", | ||
"vite": "^5.1.0" | ||
} | ||
} |
Oops, something went wrong.