├── src ├── assets │ ├── styles │ │ ├── tailwind.css │ │ └── app.css │ └── static │ │ └── images │ │ ├── development │ │ ├── webp │ │ │ ├── minion.webp │ │ │ ├── ninja.webp │ │ │ └── kungfu-panda.webp │ │ ├── png │ │ │ └── kunfu_panda │ │ │ │ ├── 01.png │ │ │ │ ├── 02.png │ │ │ │ ├── 03.png │ │ │ │ ├── 04.png │ │ │ │ └── 05.png │ │ ├── gif │ │ │ ├── kung-fu-panda-bored.gif │ │ │ ├── kung-fu-panda-hey.gif │ │ │ └── kung-fu-panda-pain.gif │ │ └── svg │ │ │ ├── diamond.svg │ │ │ ├── bitcoin.svg │ │ │ ├── chili.svg │ │ │ ├── sycee-gold.svg │ │ │ ├── cannabis.svg │ │ │ ├── onion-green.svg │ │ │ ├── money.svg │ │ │ ├── bug.svg │ │ │ ├── onion-purple.svg │ │ │ └── medicines.svg │ │ └── logo.svg ├── index.tsx ├── utils │ └── use-effect-customize.ts ├── static.d.ts └── App.tsx ├── .prettierignore ├── env ├── env.api.mjs ├── env.assets.mjs ├── env.project.mjs ├── env.general.mjs ├── env.router.mjs └── env-register.mjs ├── config ├── utils │ ├── PortHandler │ │ ├── .env │ │ └── index.js │ ├── ObjectToEnvConverter.js │ ├── StyleLoader.js │ ├── SocketHandler.js │ ├── NetworkGenerator.js │ └── WebpackCustomizeDefinePlugin.js ├── postcss.config.js ├── prettier.config.js ├── commit-packages │ └── package.json ├── types │ ├── ImportMeta.d.ts │ └── dts-generator.mjs ├── webpack.serve.config.js ├── lint-and-format-packages │ └── package.json ├── build-tool-packages │ └── package.json ├── eslint.config.js ├── cz.config.js ├── .git-cz.json ├── env │ └── env.mjs ├── .eslintrc-auto-import.json ├── webpack.production.config.js ├── auto-imports.d.ts ├── webpack.development.config.js └── templates │ ├── index.development.image-loading.html │ └── index.development.pacman-loading.html ├── .husky ├── pre-commit ├── commit-msg └── prepare-commit-msg ├── .vscode ├── extensions.json └── settings.json ├── .gitignore ├── .editorconfig ├── index.production.html ├── package.json ├── tsconfig.json ├── tailwind.config.js ├── webpack.config.js └── README.md /src/assets/styles/tailwind.css: -------------------------------------------------------------------------------- 1 | @import 'tailwindcss/utilities'; 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Ignore all HTML files: 2 | *.html 3 | config/**/*.d.ts 4 | -------------------------------------------------------------------------------- /env/env.api.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 'api', 3 | data: {}, 4 | } 5 | -------------------------------------------------------------------------------- /config/utils/PortHandler/.env: -------------------------------------------------------------------------------- 1 | PUPPETEER_SSR_PORT=8081 2 | SOCKET_IO_PORT=3030 3 | -------------------------------------------------------------------------------- /env/env.assets.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 'assets', 3 | data: {}, 4 | } 5 | -------------------------------------------------------------------------------- /env/env.project.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 'project', 3 | data: {}, 4 | } 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run pre-commit 5 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx commitlint --edit $1 5 | -------------------------------------------------------------------------------- /env/env.general.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 'general', 3 | data: { 4 | greeting: 'React 18', 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /.husky/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | exec < /dev/tty && node_modules/.bin/cz --hook || true 5 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "TabNine.tabnine-vscode", 4 | "ionutvmi.path-autocomplete", 5 | "rohit-gohri.format-code-action" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /config/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | 'postcss-preset-env', 4 | 'autoprefixer', 5 | require('tailwindcss')('./tailwind.config.js'), 6 | ], 7 | } 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | package-lock.json 3 | yarn.lock 4 | node_modules 5 | dist 6 | config/env/.env 7 | config/env/env.json 8 | config/.DS_Store 9 | *.DS_Store 10 | .swc 11 | -------------------------------------------------------------------------------- /src/assets/static/images/development/webp/minion.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/webp/minion.webp -------------------------------------------------------------------------------- /src/assets/static/images/development/webp/ninja.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/webp/ninja.webp -------------------------------------------------------------------------------- /env/env.router.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 'router', 3 | data: { 4 | name: { 5 | home_page: 'Home Page', 6 | }, 7 | path: { 8 | home_page: '/', 9 | }, 10 | }, 11 | } 12 | -------------------------------------------------------------------------------- /src/assets/static/images/development/png/kunfu_panda/01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/png/kunfu_panda/01.png -------------------------------------------------------------------------------- /src/assets/static/images/development/png/kunfu_panda/02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/png/kunfu_panda/02.png -------------------------------------------------------------------------------- /src/assets/static/images/development/png/kunfu_panda/03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/png/kunfu_panda/03.png -------------------------------------------------------------------------------- /src/assets/static/images/development/png/kunfu_panda/04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/png/kunfu_panda/04.png -------------------------------------------------------------------------------- /src/assets/static/images/development/png/kunfu_panda/05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/png/kunfu_panda/05.png -------------------------------------------------------------------------------- /src/assets/static/images/development/webp/kungfu-panda.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/webp/kungfu-panda.webp -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [**] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 2 7 | trim_trailing_whitespace = true 8 | end_of_line = lf 9 | insert_final_newline = true 10 | -------------------------------------------------------------------------------- /src/assets/static/images/development/gif/kung-fu-panda-bored.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/gif/kung-fu-panda-bored.gif -------------------------------------------------------------------------------- /src/assets/static/images/development/gif/kung-fu-panda-hey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/gif/kung-fu-panda-hey.gif -------------------------------------------------------------------------------- /src/assets/static/images/development/gif/kung-fu-panda-pain.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anhchangvt1994/webpack-project--template-react-ts/HEAD/src/assets/static/images/development/gif/kung-fu-panda-pain.gif -------------------------------------------------------------------------------- /config/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSameLine: false, 3 | semi: false, 4 | singleQuote: true, 5 | useTabs: true, 6 | printWidth: 80, 7 | trailingComma: 'es5', 8 | vueIndentScriptAndStyle: true, 9 | } 10 | -------------------------------------------------------------------------------- /env/env-register.mjs: -------------------------------------------------------------------------------- 1 | import ENV_ROUTER from './env.router.mjs' 2 | import ENV_GENERAL from './env.general.mjs' 3 | import ENV_PROJECT from './env.project.mjs' 4 | import ENV_API from './env.api.mjs' 5 | 6 | export default [ENV_ROUTER, ENV_GENERAL, ENV_PROJECT, ENV_API] 7 | -------------------------------------------------------------------------------- /src/index.tsx: -------------------------------------------------------------------------------- 1 | import 'assets/styles/tailwind.css' 2 | import 'assets/styles/app.css' 3 | 4 | const root = createRoot(document.getElementById('root')) 5 | const App = React.lazy(() => import('App')) 6 | 7 | root.render( 8 | 9 | 10 | 11 | ) 12 | -------------------------------------------------------------------------------- /config/utils/ObjectToEnvConverter.js: -------------------------------------------------------------------------------- 1 | module.exports = (obj) => { 2 | if (!obj || typeof obj !== 'object') return 3 | 4 | let tmpENVContent = '' 5 | for (let key in obj) { 6 | tmpENVContent += key + '=' + (!obj[key] ? '' : obj[key] + '\n') 7 | } 8 | 9 | return tmpENVContent 10 | } 11 | -------------------------------------------------------------------------------- /src/utils/use-effect-customize.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | 3 | class useEffectCustomize { 4 | private _state: Array = [] 5 | 6 | constructor(_state) { 7 | this._state = _state 8 | } 9 | 10 | init(cb) { 11 | useEffect(cb, this._state) 12 | } 13 | } 14 | 15 | export default useEffectCustomize 16 | -------------------------------------------------------------------------------- /index.production.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | <%= htmlWebpackPlugin.options.title %> 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /config/commit-packages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "commit-packages", 3 | "version": "1.0.0", 4 | "description": "commit-packages", 5 | "main": "", 6 | "scripts": {}, 7 | "author": "", 8 | "license": "ISC", 9 | "dependencies": { 10 | "@commitlint/config-conventional": "^17.6.6", 11 | "commitizen": "^4.3.0", 12 | "commitlint": "^17.6.6", 13 | "cz-git": "^1.6.1", 14 | "husky": "^8.0.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /config/types/ImportMeta.d.ts: -------------------------------------------------------------------------------- 1 | interface ImportMeta { 2 | env: Env; 3 | } 4 | 5 | interface Env { 6 | PORT: number; 7 | IO_PORT: number; 8 | LOCAL_ADDRESS: string; 9 | LOCAL_HOST: string; 10 | IPV4_ADDRESS: string; 11 | IPV4_HOST: string; 12 | IO_HOST: string; 13 | ROUTER_NAME_HOME_PAGE: string; 14 | ROUTER_PATH_HOME_PAGE: string; 15 | GENERAL_GREETING: string; 16 | } 17 | -------------------------------------------------------------------------------- /config/webpack.serve.config.js: -------------------------------------------------------------------------------- 1 | const { webpack } = require('webpack') 2 | const WebpackDevServer = require('webpack-dev-server') 3 | const { findFreePort } = require('./utils/PortHandler') 4 | 5 | ;(async () => { 6 | const port = await findFreePort(process.env.PORT) 7 | const serverInitial = new WebpackDevServer( 8 | webpack({ 9 | mode: 'development', 10 | entry: {}, 11 | output: {}, 12 | }), 13 | { 14 | compress: true, 15 | port: port, 16 | static: './dist', 17 | historyApiFallback: true, 18 | } 19 | ) 20 | 21 | serverInitial.start() 22 | })() 23 | -------------------------------------------------------------------------------- /src/assets/styles/app.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | .app { 8 | display: flex; 9 | flex-direction: column; 10 | height: 100vh; 11 | width: 100vw; 12 | align-items: center; 13 | justify-content: center; 14 | background: rgb(232, 242, 245); 15 | 16 | .greeting-label { 17 | font-size: 32px; 18 | font-weight: bold; 19 | } 20 | 21 | .counter-label { 22 | font-size: 24px; 23 | margin-top: 24px; 24 | } 25 | 26 | &-logo { 27 | animation: app-logo-spin infinite 20s linear; 28 | } 29 | } 30 | 31 | @keyframes app-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /config/lint-and-format-packages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lint-and-format-packages", 3 | "version": "1.0.0", 4 | "description": "lint-and-format-packages", 5 | "main": "", 6 | "scripts": {}, 7 | "author": "", 8 | "license": "ISC", 9 | "dependencies": { 10 | "eslint": "^8.44.0", 11 | "eslint-config-airbnb": "^19.0.4", 12 | "eslint-config-airbnb-typescript": "^17.0.0", 13 | "eslint-config-prettier": "^8.8.0", 14 | "eslint-import-resolver-custom-alias": "^1.3.2", 15 | "eslint-plugin-import": "^2.27.5", 16 | "eslint-plugin-jsx-a11y": "^6.7.1", 17 | "eslint-plugin-prettier": "^4.2.1", 18 | "eslint-plugin-react": "^7.32.2", 19 | "eslint-plugin-react-hooks": "^4.6.0", 20 | "espree": "^9.6.0", 21 | "lint-staged": "^13.2.3", 22 | "prettier": "^2.8.8" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "nuxt.isNuxtApp": false, 3 | 4 | "path-autocomplete.extensionOnImport": true, 5 | "path-autocomplete.includeExtension": true, 6 | "path-autocomplete.excludedItems": { 7 | "**": { 8 | "when": "**/*.{js,ts,jsx,tsx}", 9 | "isDir": true, 10 | "context": "(import|require).*" 11 | } 12 | }, 13 | "path-autocomplete.pathMappings": { 14 | "/": "${workspace}/src/assets/static", 15 | "assets": "${workspace}/src/assets" 16 | }, 17 | "path-autocomplete.pathSeparators": " \t({[", 18 | "editor.suggest.showModules": false, 19 | "editor.formatOnSave": false, 20 | "editor.defaultFormatter": "esbenp.prettier-vscode", 21 | "editor.codeActionsOnSave": [ 22 | "source.formatDocument", 23 | "source.fixAll.tslint", 24 | "source.fixAll.eslint" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /src/static.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.svg' { 2 | const value: string 3 | export = value 4 | } 5 | declare module '*.png' { 6 | const value: string 7 | export = value 8 | } 9 | declare module '*.jpg' { 10 | const value: string 11 | export = value 12 | } 13 | declare module '*.jpeg' { 14 | const value: string 15 | export = value 16 | } 17 | declare module '*.webp' { 18 | const value: string 19 | export = value 20 | } 21 | declare module '*.mp3' { 22 | const value: string 23 | export = value 24 | } 25 | declare module '*.mp4' { 26 | const value: string 27 | export = value 28 | } 29 | declare module '*.mov' { 30 | const value: string 31 | export = value 32 | } 33 | declare module '*.mkv' { 34 | const value: string 35 | export = value 36 | } 37 | declare module '*.webm' { 38 | const value: string 39 | export = value 40 | } 41 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import useEffectCustomize from 'utils/use-effect-customize' 2 | 3 | function App() { 4 | const [count, setCount] = useState(0) 5 | 6 | const useEffectCounter = new useEffectCustomize([count]) 7 | 8 | useEffectCounter.init(() => { 9 | const timer = setTimeout(() => setCount(count + 1), 1000) 10 | return () => clearTimeout(timer) 11 | }) 12 | 13 | return ( 14 |
15 | React Logo 22 |

23 | Welcome to {import.meta.env.GENERAL_GREETING} 24 |

25 |

26 | Page has been open for {count} seconds. 27 |

28 |
29 | ) 30 | } // App() 31 | 32 | export default App 33 | -------------------------------------------------------------------------------- /config/utils/StyleLoader.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const loader = require('style-loader') 3 | 4 | module.exports = function () {} 5 | 6 | module.exports.pitch = function (request) { 7 | const result = loader.pitch.call(this, request) 8 | const index = result.indexOf( 9 | 'options.styleTagTransform = styleTagTransformFn;\n' 10 | ) 11 | if (index === -1) return result 12 | const insertIndex = index - 1 13 | 14 | // eslint-disable-next-line prefer-destructuring 15 | const resourcePath = this.resourcePath 16 | const relativePath = path.relative( 17 | path.resolve(__dirname, '..'), 18 | resourcePath 19 | ) 20 | 21 | const insertAttr = ` 22 | if (typeof options.attributes !== 'object') { 23 | options.attributes = {} 24 | } 25 | options.attributes["source-path"] = '${relativePath}' // do anything you want 26 | runtimeOptions.attributes = options.attributes; 27 | ` 28 | 29 | console.log( 30 | result.slice(0, insertIndex) + insertAttr + result.slice(insertIndex) 31 | ) 32 | 33 | return result.slice(0, insertIndex) + insertAttr + result.slice(insertIndex) 34 | } 35 | -------------------------------------------------------------------------------- /config/utils/SocketHandler.js: -------------------------------------------------------------------------------- 1 | const http = require('http') 2 | const { Server } = require('socket.io') 3 | const { findFreePort, setPort } = require('./PortHandler') 4 | 5 | const server = http.createServer() 6 | const io = new Server(server) 7 | 8 | let socket = null 9 | const promiseIOConnection = new Promise(async (resolve) => { 10 | const SOCKET_IO_PORT = await findFreePort(3030) 11 | setPort(SOCKET_IO_PORT, 'SOCKET_IO_PORT') 12 | 13 | let callback = null 14 | io.on('connection', (initializeSocket) => { 15 | let sockets = {} 16 | // Save the list of all connections to a variable 17 | sockets[initializeSocket.io] = initializeSocket 18 | socket = initializeSocket 19 | 20 | // When disconnect, delete the socket with the variable 21 | initializeSocket.on('disconnect', () => { 22 | delete sockets[initializeSocket.id] 23 | }) 24 | 25 | if (callback) { 26 | callback({ server, io, socket }) 27 | } else { 28 | resolve({ 29 | server, 30 | io, 31 | socket, 32 | setupCallback: function (fn) { 33 | callback = fn 34 | }, 35 | }) 36 | } 37 | }) 38 | 39 | server.listen(SOCKET_IO_PORT) 40 | }) 41 | 42 | module.exports = promiseIOConnection 43 | -------------------------------------------------------------------------------- /config/utils/NetworkGenerator.js: -------------------------------------------------------------------------------- 1 | //======================================= 2 | // NOTE - generate External IP 3 | //======================================= 4 | const os = require('os') 5 | const OSNetworkInterfaces = os.networkInterfaces() 6 | const Ethernet = 7 | OSNetworkInterfaces.Ethernet || Object.values(OSNetworkInterfaces) 8 | 9 | let IPV4_ADDRESS = null 10 | 11 | if (Ethernet) { 12 | let ethernetFormatted = Ethernet 13 | 14 | if (ethernetFormatted[0].length) { 15 | let tmpEthernetFormatted = [] 16 | 17 | ethernetFormatted.forEach(function (EthernetItem) { 18 | tmpEthernetFormatted = tmpEthernetFormatted.concat(EthernetItem) 19 | }) 20 | 21 | ethernetFormatted = tmpEthernetFormatted 22 | } 23 | 24 | ethernetFormatted.some(function (ethernetItem) { 25 | const ethernetItemInfo = 26 | ethernetItem.family && 27 | /ipv4|4/.test(ethernetItem.family?.toLowerCase?.() ?? ethernetItem.family) 28 | ? ethernetItem 29 | : null 30 | 31 | if ( 32 | ethernetItemInfo && 33 | ethernetItemInfo.address !== '127.0.0.1' && 34 | (ethernetItemInfo.address.includes('192') || 35 | ethernetItemInfo.address.includes('172')) 36 | ) { 37 | IPV4_ADDRESS = ethernetItemInfo.address 38 | return true 39 | } 40 | }) 41 | } 42 | 43 | module.exports = { IPV4_ADDRESS } 44 | -------------------------------------------------------------------------------- /config/types/dts-generator.mjs: -------------------------------------------------------------------------------- 1 | import { 2 | quicktype, 3 | InputData, 4 | jsonInputForTargetLanguage, 5 | } from 'quicktype-core' 6 | import { 7 | ENV_OBJECT_DEFAULT as ImportMeta, 8 | promiseENVWriteFileSync, 9 | } from '../env/env.mjs' 10 | import { writeFile } from 'fs' 11 | import { resolve } from 'path' 12 | 13 | async function quicktypeJSON(targetLanguage, jsonString) { 14 | const jsonInput = jsonInputForTargetLanguage(targetLanguage) 15 | 16 | // We could add multiple samples for the same desired 17 | // type, or many sources for other types. Here we're 18 | // just making one type from one piece of sample JSON. 19 | await jsonInput.addSource({ 20 | name: 'ImportMeta', 21 | samples: [jsonString], 22 | }) 23 | 24 | const inputData = new InputData() 25 | inputData.addInput(jsonInput) 26 | 27 | return await quicktype({ 28 | inputData, 29 | lang: targetLanguage, 30 | rendererOptions: { 'just-types': 'true' }, 31 | }) 32 | } 33 | 34 | async function main() { 35 | const { lines: tdsGroup } = await quicktypeJSON( 36 | 'typescript', 37 | JSON.stringify({ env: ImportMeta }) 38 | ) 39 | 40 | writeFile( 41 | resolve('./config/types', 'ImportMeta.d.ts'), 42 | tdsGroup.join('\n').replace(/export\s/g, ''), 43 | function (err) {} 44 | ) 45 | } 46 | 47 | main() 48 | 49 | export { promiseENVWriteFileSync } 50 | -------------------------------------------------------------------------------- /src/assets/static/images/development/svg/diamond.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /config/build-tool-packages/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "build-tool-packages", 3 | "version": "1.0.0", 4 | "description": "build-tool-packages", 5 | "main": "", 6 | "scripts": {}, 7 | "author": "", 8 | "license": "ISC", 9 | "overrides": { 10 | "isomorphic-fetch@*": "$isomorphic-fetch" 11 | }, 12 | "dependencies": { 13 | "@babel/core": "7.22.15", 14 | "@babel/preset-env": "^7.22.15", 15 | "@babel/preset-react": "7.22.15", 16 | "@babel/preset-typescript": "7.22.15", 17 | "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10", 18 | "@types/react": "^18.2.14", 19 | "@types/webpack-env": "^1.18.1", 20 | "autoprefixer": "^10.4.14", 21 | "babel-loader": "^9.1.2", 22 | "clean-webpack-plugin": "^4.0.0", 23 | "copy-webpack-plugin": "^11.0.0", 24 | "core-js": "^3.31.0", 25 | "cross-env": "^7.0.3", 26 | "css-loader": "^6.8.1", 27 | "css-minimizer-webpack-plugin": "^5.0.1", 28 | "html-webpack-plugin": "^5.5.3", 29 | "isomorphic-fetch": "^3.0.0", 30 | "mini-css-extract-plugin": "^2.7.6", 31 | "postcss": "^8.4.24", 32 | "postcss-loader": "^7.3.3", 33 | "postcss-preset-env": "^9.0.0", 34 | "postcss-simple-vars": "^7.0.1", 35 | "purgecss-webpack-plugin": "^5.0.0", 36 | "quicktype-core": "^23.0.49", 37 | "react-refresh": "^0.14.0", 38 | "socket.io": "^4.7.1", 39 | "esbuild-loader": "^4.0.2", 40 | "tailwindcss": "^3.3.2", 41 | "terser-webpack-plugin": "^5.3.9", 42 | "unplugin-auto-import": "^0.16.5", 43 | "webpack": "^5.88.1", 44 | "webpack-cli": "^5.1.4", 45 | "webpack-dev-server": "^4.15.1" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /config/eslint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | ignorePatterns: ['webpack.config.js', 'env/**/*', 'config/**/*', 'dist/**/*'], 4 | extends: [ 5 | '.eslintrc-auto-import.json', 6 | 'airbnb-typescript', 7 | 'airbnb/hooks', 8 | 'plugin:@typescript-eslint/recommended', 9 | // 'plugin:jest/recommended', 10 | 'plugin:prettier/recommended', 11 | 'eslint:recommended', 12 | 'plugin:import/recommended', 13 | 'plugin:import/typescript', 14 | 'plugin:import/errors', 15 | 'plugin:import/warnings', 16 | 'prettier', 17 | ], 18 | plugins: ['react', '@typescript-eslint/eslint-plugin'], 19 | env: { 20 | browser: true, 21 | es6: true, 22 | node: true, 23 | // jest: true, 24 | }, 25 | globals: { 26 | Atomics: 'readonly', 27 | SharedArrayBuffer: 'readonly', 28 | NodeJS: true, 29 | }, 30 | parser: '@typescript-eslint/parser', 31 | parserOptions: { 32 | parser: { 33 | js: 'espree', 34 | jsx: 'espree', 35 | '