This repository has been archived by the owner on Oct 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
4,956 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VITE_API_URL=https://api.example.com |
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 @@ | ||
VITE_API_URL=https://api.example.com |
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,6 @@ | ||
node_modules | ||
node_modules/* | ||
public | ||
build | ||
dist | ||
dist-ssr |
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,70 @@ | ||
module.exports = { | ||
extends: [ | ||
'airbnb', | ||
'prettier', | ||
'eslint:recommended', | ||
'plugin:react/recommended', | ||
'plugin:import/recommended', | ||
'plugin:jsx-a11y/recommended', | ||
'eslint-config-prettier', | ||
], | ||
plugins: ['react', 'react-hooks', 'prettier', 'jsx-a11y', 'import'], | ||
settings: { | ||
react: { | ||
// Tells eslint-plugin-react to automatically detect the version of React to use. | ||
version: 'detect', | ||
}, | ||
// Tells eslint how to resolve imports | ||
'import/resolver': { | ||
node: { | ||
paths: ['src'], | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
jest: true, | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
}, | ||
rules: { | ||
'import/extensions': 'off', | ||
'import/no-unresolved': 'off', | ||
'react/prop-types': 'off', | ||
'prettier/prettier': 'error', | ||
'jsx-a11y/anchor-is-valid': 'off', | ||
'react-hooks/exhaustive-deps': 'off', | ||
'react/react-in-jsx-scope': 'off', | ||
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], | ||
'no-unused-expressions': [ | ||
'error', | ||
{ allowShortCircuit: true, allowTernary: true }, | ||
], | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: true, | ||
}, | ||
], | ||
'linebreak-style': 'off', | ||
'implicit-arrow-linebreak': 'off', | ||
indent: 'off', | ||
'object-curly-newline': 'off', | ||
'operator-linebreak': 'off', | ||
'no-confusing-arrow': 'off', | ||
'function-paren-newline': 'off', | ||
'no-mixed-operators': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-plusplus': 'off', | ||
'no-param-reassign': 'off', | ||
'no-unused-vars': 'off', | ||
'react/react-in-jsx-scope': '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,26 @@ | ||
# 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? | ||
|
||
.env |
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,9 @@ | ||
node_modules | ||
/.cache | ||
/.husky | ||
.eslintignore | ||
.gitignore | ||
.git | ||
LICENSE | ||
build | ||
dist |
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 @@ | ||
{ | ||
"semi": true, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"bracketSpacing": true | ||
} |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Emre Çil | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,73 @@ | ||
## viterjs-template | ||
|
||
JavaScript + React + Redux + Mui + Axios + ESLint + Prettier | ||
|
||
![viterjs-template](https://iili.io/yYpGaV.md.png) | ||
|
||
### Getting Started | ||
|
||
#### Clone the repo | ||
|
||
``` | ||
npx degit emre-cil/viterjs-template my-app | ||
``` | ||
|
||
``` | ||
cd my-app | ||
``` | ||
|
||
#### Install Dependencies | ||
|
||
``` | ||
pnpm install | ||
``` | ||
|
||
#### Run | ||
|
||
``` | ||
pnpm dev | ||
``` | ||
|
||
#### Paths | ||
|
||
Application using absolute paths | ||
Example: '@/components/Counter/Counter'; | ||
|
||
if you don't want to use you can remove these lines from | ||
|
||
> vite.config.js | ||
``` | ||
resolve: { | ||
alias: { | ||
'@': path.resolve(__dirname, 'src'), | ||
}, | ||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'], | ||
}, | ||
``` | ||
|
||
> jsconfig.json | ||
``` | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
``` | ||
|
||
|
||
|
||
### Scripts | ||
|
||
| Script | Description | | ||
| ------------- | ---------------------------------- | | ||
| pnpm dev | Runs the application. | | ||
| pnpm build | Create builds for the application. | | ||
| pnpm preview | Runs the Vite preview | | ||
| pnpm lint | Display eslint errors | | ||
| pnpm lint:fix | Fix the eslint errors | | ||
| pnpm format | Runs prettier for all files | | ||
| pnpm test | Run tests | | ||
|
||
|
||
### Check List | ||
```` |
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 @@ | ||
<!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" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link href="https://fonts.googleapis.com/css2?family=Dosis:wght@300;400;500;600&display=swap" rel="stylesheet" /> | ||
<title>Vite + React</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.jsx"></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,18 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "commonjs", | ||
"target": "ESNext", | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
"noEmit": true, | ||
"resolveJsonModule": true, | ||
"moduleResolution": "Node", | ||
"allowSyntheticDefaultImports": true, | ||
"baseUrl": "./src", | ||
"paths": { | ||
"@/*": ["./*"] | ||
} | ||
}, | ||
"exclude": ["node_modules", "**/node_modules/*", "dist", "**/dist/*"], | ||
"include": ["src/**/*"] | ||
} |
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,71 @@ | ||
{ | ||
"name": "viterjs-template", | ||
"version": "1.1.7", | ||
"description": "React + Vite + Redux + MuI + axios + RRD + Prettier => Boilerplate", | ||
"license": "MIT", | ||
"author": "emrecil <info.emrecil@gmail.com>", | ||
"keywords": [ | ||
"react", | ||
"boilerplate", | ||
"javaScript", | ||
"starter", | ||
"vite", | ||
"redux", | ||
"material-ui", | ||
"axios", | ||
"rrd", | ||
"prettier" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/emre-cil/viterjs-template.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/emre-cil/viterjs-template/issues" | ||
}, | ||
"homepage": "https://github.com/emre-cil/viterjs-template#readme", | ||
"scripts": { | ||
"dev": "vite --open", | ||
"start": "vite --open", | ||
"host": "vite --open --host", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"lint": "eslint src --ext .js,.jsx,.ts,.tsx", | ||
"lint:fix": "eslint src --ext .js,.jsx,.ts,.tsx --fix", | ||
"format": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --write", | ||
"format+lint": "prettier \"src/**/*.{js,jsx,ts,tsx,css,scss}\" --write && eslint src --ext .js,.jsx,.ts,.tsx --fix", | ||
"test": "vitest run", | ||
"test:watch": "vitest", | ||
"test:cover": "vitest run --coverage" | ||
}, | ||
"dependencies": { | ||
"@emotion/react": "^11.11.0", | ||
"@emotion/styled": "^11.11.0", | ||
"@mui/icons-material": "^5.11.16", | ||
"@mui/material": "^5.13.0", | ||
"@reduxjs/toolkit": "^1.9.5", | ||
"axios": "^1.4.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-redux": "^8.0.5", | ||
"react-router-dom": "^6.11.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.21.8", | ||
"@types/react": "^18.2.6", | ||
"@types/react-dom": "^18.2.4", | ||
"@vitejs/plugin-react-swc": "^3.3.1", | ||
"eslint": "^8.40.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"prettier": "^2.8.8", | ||
"vite": "^4.3.6", | ||
"vite-plugin-fonts": "^0.7.0", | ||
"vitest": "^0.31.0" | ||
} | ||
} |
Oops, something went wrong.