Skip to content

Commit

Permalink
init for client
Browse files Browse the repository at this point in the history
Co-authored-by: Đậu Văn Đăng Khoa <[email protected]>
  • Loading branch information
HoangTran0410 and khoakomlem committed Oct 18, 2022
1 parent 2d24dd2 commit 061fdb9
Show file tree
Hide file tree
Showing 12 changed files with 6,425 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
16 changes: 16 additions & 0 deletions LOL2D-Pixi.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"eslint.format.enable": true,
"eslint.workingDirectories": [
"./client",
"./core",
"./server"
],
"editor.formatOnSave": true
}
}
32 changes: 32 additions & 0 deletions client/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"xo"
],
"overrides": [
{
"extends": [
"xo-typescript"
],
"files": [
"*.ts",
"*.tsx"
]
}
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json"]
},
"plugins": [
"react"
],
"rules": {
}
}
130 changes: 130 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# 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
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://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/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*
1 change: 0 additions & 1 deletion client/README.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
Client pixi here
3 changes: 3 additions & 0 deletions client/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"/dist/index.js": "/dist/index.js"
}
34 changes: 34 additions & 0 deletions client/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"watch": "mix watch"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/preset-react": "^7.18.6",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": ">=5.31.0",
"@typescript-eslint/parser": ">=5.31.0",
"eslint": ">=8.0.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-config-xo": "^0.42.0",
"eslint-config-xo-typescript": "^0.53.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.31.10",
"laravel-mix": "^6.0.49",
"ts-loader": "^9.4.1",
"typescript": ">=4.4"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
5 changes: 5 additions & 0 deletions client/src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from 'react';

export default function App() {
return (<div>react rea</div>);
}
8 changes: 8 additions & 0 deletions client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import {createRoot} from 'react-dom/client';
import App from './App';

const container = document.getElementById('root');
const root = createRoot(container);

root.render(<App />);
7 changes: 7 additions & 0 deletions client/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"compilerOptions": {
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"jsx": "react",
}
}
2 changes: 2 additions & 0 deletions client/webpack.mix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const mix = require("laravel-mix");
mix.ts("src/index.tsx", "dist/index.js").react();
Loading

0 comments on commit 061fdb9

Please sign in to comment.