diff --git a/client/src/static/img/0801.png b/client/src/static/img/0801.png deleted file mode 100644 index 9a6b23e..0000000 Binary files a/client/src/static/img/0801.png and /dev/null differ diff --git a/infra/db.sql b/infra/db/db.sql similarity index 100% rename from infra/db.sql rename to infra/db/db.sql diff --git a/client/.env b/main-web/client/.env similarity index 100% rename from client/.env rename to main-web/client/.env diff --git a/client/.env.production b/main-web/client/.env.production similarity index 100% rename from client/.env.production rename to main-web/client/.env.production diff --git a/client/.gitignore b/main-web/client/.gitignore similarity index 100% rename from client/.gitignore rename to main-web/client/.gitignore diff --git a/client/README.md b/main-web/client/README.md similarity index 100% rename from client/README.md rename to main-web/client/README.md diff --git a/client/package.json b/main-web/client/package.json similarity index 100% rename from client/package.json rename to main-web/client/package.json diff --git a/client/public/favicon.ico b/main-web/client/public/favicon.ico similarity index 100% rename from client/public/favicon.ico rename to main-web/client/public/favicon.ico diff --git a/client/public/index.html b/main-web/client/public/index.html similarity index 100% rename from client/public/index.html rename to main-web/client/public/index.html diff --git a/client/public/manifest.json b/main-web/client/public/manifest.json similarity index 100% rename from client/public/manifest.json rename to main-web/client/public/manifest.json diff --git a/client/public/robots.txt b/main-web/client/public/robots.txt similarity index 100% rename from client/public/robots.txt rename to main-web/client/public/robots.txt diff --git a/client/src/App.css b/main-web/client/src/App.css similarity index 100% rename from client/src/App.css rename to main-web/client/src/App.css diff --git a/client/src/App.test.tsx b/main-web/client/src/App.test.tsx similarity index 100% rename from client/src/App.test.tsx rename to main-web/client/src/App.test.tsx diff --git a/client/src/App.tsx b/main-web/client/src/App.tsx similarity index 100% rename from client/src/App.tsx rename to main-web/client/src/App.tsx diff --git a/client/src/components/about.tsx b/main-web/client/src/components/about.tsx similarity index 100% rename from client/src/components/about.tsx rename to main-web/client/src/components/about.tsx diff --git a/client/src/components/archive.tsx b/main-web/client/src/components/archive.tsx similarity index 100% rename from client/src/components/archive.tsx rename to main-web/client/src/components/archive.tsx diff --git a/client/src/components/contact.tsx b/main-web/client/src/components/contact.tsx similarity index 100% rename from client/src/components/contact.tsx rename to main-web/client/src/components/contact.tsx diff --git a/client/src/components/guide.tsx b/main-web/client/src/components/guide.tsx similarity index 100% rename from client/src/components/guide.tsx rename to main-web/client/src/components/guide.tsx diff --git a/client/src/components/home.tsx b/main-web/client/src/components/home.tsx similarity index 100% rename from client/src/components/home.tsx rename to main-web/client/src/components/home.tsx diff --git a/client/src/components/notfound.tsx b/main-web/client/src/components/notfound.tsx similarity index 100% rename from client/src/components/notfound.tsx rename to main-web/client/src/components/notfound.tsx diff --git a/client/src/components/players.tsx b/main-web/client/src/components/players.tsx similarity index 100% rename from client/src/components/players.tsx rename to main-web/client/src/components/players.tsx diff --git a/client/src/components/scoreboard.tsx b/main-web/client/src/components/scoreboard.tsx similarity index 100% rename from client/src/components/scoreboard.tsx rename to main-web/client/src/components/scoreboard.tsx diff --git a/client/src/components/tournaments.tsx b/main-web/client/src/components/tournaments.tsx similarity index 100% rename from client/src/components/tournaments.tsx rename to main-web/client/src/components/tournaments.tsx diff --git a/client/src/i18n.ts b/main-web/client/src/i18n.ts similarity index 100% rename from client/src/i18n.ts rename to main-web/client/src/i18n.ts diff --git a/client/src/index.css b/main-web/client/src/index.css similarity index 100% rename from client/src/index.css rename to main-web/client/src/index.css diff --git a/client/src/index.tsx b/main-web/client/src/index.tsx similarity index 100% rename from client/src/index.tsx rename to main-web/client/src/index.tsx diff --git a/client/src/locale/en.json b/main-web/client/src/locale/en.json similarity index 100% rename from client/src/locale/en.json rename to main-web/client/src/locale/en.json diff --git a/client/src/locale/ja.json b/main-web/client/src/locale/ja.json similarity index 100% rename from client/src/locale/ja.json rename to main-web/client/src/locale/ja.json diff --git a/client/src/logo.svg b/main-web/client/src/logo.svg similarity index 100% rename from client/src/logo.svg rename to main-web/client/src/logo.svg diff --git a/client/src/models/IArchiveItem.ts b/main-web/client/src/models/IArchiveItem.ts similarity index 100% rename from client/src/models/IArchiveItem.ts rename to main-web/client/src/models/IArchiveItem.ts diff --git a/client/src/models/IContactQuestion.ts b/main-web/client/src/models/IContactQuestion.ts similarity index 100% rename from client/src/models/IContactQuestion.ts rename to main-web/client/src/models/IContactQuestion.ts diff --git a/client/src/models/IGuideItem.ts b/main-web/client/src/models/IGuideItem.ts similarity index 100% rename from client/src/models/IGuideItem.ts rename to main-web/client/src/models/IGuideItem.ts diff --git a/client/src/models/IPlayerInfo.ts b/main-web/client/src/models/IPlayerInfo.ts similarity index 100% rename from client/src/models/IPlayerInfo.ts rename to main-web/client/src/models/IPlayerInfo.ts diff --git a/client/src/react-app-env.d.ts b/main-web/client/src/react-app-env.d.ts similarity index 100% rename from client/src/react-app-env.d.ts rename to main-web/client/src/react-app-env.d.ts diff --git a/client/src/serviceWorker.ts b/main-web/client/src/serviceWorker.ts similarity index 100% rename from client/src/serviceWorker.ts rename to main-web/client/src/serviceWorker.ts diff --git a/client/src/setupTests.ts b/main-web/client/src/setupTests.ts similarity index 100% rename from client/src/setupTests.ts rename to main-web/client/src/setupTests.ts diff --git a/client/src/static/font/indieflower.ttf b/main-web/client/src/static/font/indieflower.ttf similarity index 100% rename from client/src/static/font/indieflower.ttf rename to main-web/client/src/static/font/indieflower.ttf diff --git a/client/src/static/img/00_bluecap_1204.png b/main-web/client/src/static/img/00_bluecap_1204.png similarity index 100% rename from client/src/static/img/00_bluecap_1204.png rename to main-web/client/src/static/img/00_bluecap_1204.png diff --git a/client/src/static/img/00_redcap_1204.png b/main-web/client/src/static/img/00_redcap_1204.png similarity index 100% rename from client/src/static/img/00_redcap_1204.png rename to main-web/client/src/static/img/00_redcap_1204.png diff --git a/client/src/static/img/01_sheep_vincent_1204.png b/main-web/client/src/static/img/01_sheep_vincent_1204.png similarity index 100% rename from client/src/static/img/01_sheep_vincent_1204.png rename to main-web/client/src/static/img/01_sheep_vincent_1204.png diff --git a/client/src/static/img/01_vincent_1204.png b/main-web/client/src/static/img/01_vincent_1204.png similarity index 100% rename from client/src/static/img/01_vincent_1204.png rename to main-web/client/src/static/img/01_vincent_1204.png diff --git a/client/src/static/img/02_katherine_1204.png b/main-web/client/src/static/img/02_katherine_1204.png similarity index 100% rename from client/src/static/img/02_katherine_1204.png rename to main-web/client/src/static/img/02_katherine_1204.png diff --git a/client/src/static/img/03_catherine_1204.png b/main-web/client/src/static/img/03_catherine_1204.png similarity index 100% rename from client/src/static/img/03_catherine_1204.png rename to main-web/client/src/static/img/03_catherine_1204.png diff --git a/client/src/static/img/04_rin_1204.png b/main-web/client/src/static/img/04_rin_1204.png similarity index 100% rename from client/src/static/img/04_rin_1204.png rename to main-web/client/src/static/img/04_rin_1204.png diff --git a/client/src/static/img/05_orlando_1204.png b/main-web/client/src/static/img/05_orlando_1204.png similarity index 100% rename from client/src/static/img/05_orlando_1204.png rename to main-web/client/src/static/img/05_orlando_1204.png diff --git a/client/src/static/img/06_jonny_1204.png b/main-web/client/src/static/img/06_jonny_1204.png similarity index 100% rename from client/src/static/img/06_jonny_1204.png rename to main-web/client/src/static/img/06_jonny_1204.png diff --git a/client/src/static/img/07_tobby_1204.png b/main-web/client/src/static/img/07_tobby_1204.png similarity index 100% rename from client/src/static/img/07_tobby_1204.png rename to main-web/client/src/static/img/07_tobby_1204.png diff --git a/main-web/client/src/static/img/0801.png b/main-web/client/src/static/img/0801.png new file mode 100644 index 0000000..f84e2c1 Binary files /dev/null and b/main-web/client/src/static/img/0801.png differ diff --git a/client/src/static/img/0802.png b/main-web/client/src/static/img/0802.png similarity index 100% rename from client/src/static/img/0802.png rename to main-web/client/src/static/img/0802.png diff --git a/client/src/static/img/0808.png b/main-web/client/src/static/img/0808.png similarity index 100% rename from client/src/static/img/0808.png rename to main-web/client/src/static/img/0808.png diff --git a/client/src/static/img/0809.png b/main-web/client/src/static/img/0809.png similarity index 100% rename from client/src/static/img/0809.png rename to main-web/client/src/static/img/0809.png diff --git a/client/src/static/img/0815.png b/main-web/client/src/static/img/0815.png similarity index 100% rename from client/src/static/img/0815.png rename to main-web/client/src/static/img/0815.png diff --git a/client/src/static/img/08_erika_1204.png b/main-web/client/src/static/img/08_erika_1204.png similarity index 100% rename from client/src/static/img/08_erika_1204.png rename to main-web/client/src/static/img/08_erika_1204.png diff --git a/client/src/static/img/09_master_1204.png b/main-web/client/src/static/img/09_master_1204.png similarity index 100% rename from client/src/static/img/09_master_1204.png rename to main-web/client/src/static/img/09_master_1204.png diff --git a/client/src/static/img/13_joker_1204.png b/main-web/client/src/static/img/13_joker_1204.png similarity index 100% rename from client/src/static/img/13_joker_1204.png rename to main-web/client/src/static/img/13_joker_1204.png diff --git a/client/src/static/img/atlus_logo.png b/main-web/client/src/static/img/atlus_logo.png similarity index 100% rename from client/src/static/img/atlus_logo.png rename to main-web/client/src/static/img/atlus_logo.png diff --git a/client/src/static/img/background.png b/main-web/client/src/static/img/background.png similarity index 100% rename from client/src/static/img/background.png rename to main-web/client/src/static/img/background.png diff --git a/client/src/static/img/bgbg.png b/main-web/client/src/static/img/bgbg.png similarity index 100% rename from client/src/static/img/bgbg.png rename to main-web/client/src/static/img/bgbg.png diff --git a/client/src/static/img/bgimage.png b/main-web/client/src/static/img/bgimage.png similarity index 100% rename from client/src/static/img/bgimage.png rename to main-web/client/src/static/img/bgimage.png diff --git a/client/src/static/img/bgimagenight.png b/main-web/client/src/static/img/bgimagenight.png similarity index 100% rename from client/src/static/img/bgimagenight.png rename to main-web/client/src/static/img/bgimagenight.png diff --git a/client/src/static/img/buynow.png b/main-web/client/src/static/img/buynow.png similarity index 100% rename from client/src/static/img/buynow.png rename to main-web/client/src/static/img/buynow.png diff --git a/client/src/static/img/cat_fb_logo.png b/main-web/client/src/static/img/cat_fb_logo.png similarity index 100% rename from client/src/static/img/cat_fb_logo.png rename to main-web/client/src/static/img/cat_fb_logo.png diff --git a/client/src/static/img/chalice.png b/main-web/client/src/static/img/chalice.png similarity index 100% rename from client/src/static/img/chalice.png rename to main-web/client/src/static/img/chalice.png diff --git a/client/src/static/img/faito_crab.png b/main-web/client/src/static/img/faito_crab.png similarity index 100% rename from client/src/static/img/faito_crab.png rename to main-web/client/src/static/img/faito_crab.png diff --git a/client/src/static/img/for_switch.png b/main-web/client/src/static/img/for_switch.png similarity index 100% rename from client/src/static/img/for_switch.png rename to main-web/client/src/static/img/for_switch.png diff --git a/client/src/static/img/letterbox.png b/main-web/client/src/static/img/letterbox.png similarity index 100% rename from client/src/static/img/letterbox.png rename to main-web/client/src/static/img/letterbox.png diff --git a/client/src/static/img/playerbg.png b/main-web/client/src/static/img/playerbg.png similarity index 100% rename from client/src/static/img/playerbg.png rename to main-web/client/src/static/img/playerbg.png diff --git a/client/src/static/img/players.png b/main-web/client/src/static/img/players.png similarity index 100% rename from client/src/static/img/players.png rename to main-web/client/src/static/img/players.png diff --git a/client/src/static/img/rule.png b/main-web/client/src/static/img/rule.png similarity index 100% rename from client/src/static/img/rule.png rename to main-web/client/src/static/img/rule.png diff --git a/client/src/static/img/scoreboard.png b/main-web/client/src/static/img/scoreboard.png similarity index 100% rename from client/src/static/img/scoreboard.png rename to main-web/client/src/static/img/scoreboard.png diff --git a/client/src/static/img/straysheepcup0.png b/main-web/client/src/static/img/straysheepcup0.png similarity index 100% rename from client/src/static/img/straysheepcup0.png rename to main-web/client/src/static/img/straysheepcup0.png diff --git a/client/src/static/img/title_sheep.png b/main-web/client/src/static/img/title_sheep.png similarity index 100% rename from client/src/static/img/title_sheep.png rename to main-web/client/src/static/img/title_sheep.png diff --git a/client/src/static/img/twitch.png b/main-web/client/src/static/img/twitch.png similarity index 100% rename from client/src/static/img/twitch.png rename to main-web/client/src/static/img/twitch.png diff --git a/client/src/static/img/twitter.png b/main-web/client/src/static/img/twitter.png similarity index 100% rename from client/src/static/img/twitter.png rename to main-web/client/src/static/img/twitter.png diff --git a/client/src/static/img/youtube.png b/main-web/client/src/static/img/youtube.png similarity index 100% rename from client/src/static/img/youtube.png rename to main-web/client/src/static/img/youtube.png diff --git a/client/src/web.module.scss b/main-web/client/src/web.module.scss similarity index 100% rename from client/src/web.module.scss rename to main-web/client/src/web.module.scss diff --git a/client/tsconfig.json b/main-web/client/tsconfig.json similarity index 100% rename from client/tsconfig.json rename to main-web/client/tsconfig.json diff --git a/client/tslint.json b/main-web/client/tslint.json similarity index 100% rename from client/tslint.json rename to main-web/client/tslint.json diff --git a/server/.gitignore b/main-web/server/.gitignore similarity index 100% rename from server/.gitignore rename to main-web/server/.gitignore diff --git a/server/package.json b/main-web/server/package.json similarity index 92% rename from server/package.json rename to main-web/server/package.json index d5a3428..14e129b 100644 --- a/server/package.json +++ b/main-web/server/package.json @@ -15,12 +15,14 @@ "cors": "^2.8.5", "express": "^4.17.1", "mysql": "^2.18.1", + "socket.io": "^2.3.0", "ts-node-dev": "^1.0.0-pre.44", "uuid": "^7.0.3" }, "devDependencies": { "@types/express": "^4.17.6", "@types/mysql": "^2.1.4", + "@types/socket.io": "^2.1.4", "typescript": "^3.8.3", "tslint": "^5.18.0", "tslint-config-airbnb": "^5.11.1" diff --git a/server/src/index.ts b/main-web/server/src/index.ts similarity index 52% rename from server/src/index.ts rename to main-web/server/src/index.ts index cd1b84a..b653823 100644 --- a/server/src/index.ts +++ b/main-web/server/src/index.ts @@ -1,12 +1,17 @@ import express from 'express'; +import socketIo from 'socket.io'; import http from 'http'; import cors from 'cors'; import mysql from 'mysql'; import { v1 } from 'uuid'; -const port: number = 443; +import { IJankenSelect, IJankenResult } from './models/message'; + +const port: number = 8080; const app: express.Express = express(); const httpServer: http.Server = http.createServer(app); +const io: socketIo.Server = socketIo(httpServer); + const tournaments: Record = {}; const players: Record = {}; const connection = mysql.createPool({ @@ -138,8 +143,134 @@ app.use('/about', express.static('client')); app.use('/guide', express.static('client')); app.use('/archive', express.static('client')); app.use('/contact', express.static('client')); +app.use('/tool', express.static('tool')); app.use(express.static('client')); httpServer.listen(port, () => { console.log(`listening to port ${port}`); }); + +// Janken Tool + +let room: boolean = false; +let playerOne: string = ''; +let playerTwo: string = ''; +let playerOneOption: string = ''; +let playerTwoOption: string = ''; +let stages: string[] = []; +let currentIndex: number = 0; +const defaultStages: string[] = ['cementery', 'prison', 'torture', 'inquisition', 'quadrangle', 'clock', 'spiral', 'empireo', 'cathedral', 'close', 'arrange']; + + +io.on('connection', (socket: socketIo.Socket) => { + socket.on('disconnect', () => { + console.log('disconnect'); + }); + + socket.on('exitGame', () => { + console.log('exitGame'); + io.emit('exitGame'); + room = false; + initRoom(); + Object.keys(io.sockets.sockets).forEach((s) => { + io.sockets.sockets[s].disconnect(true); + }); + }); + socket.on('janken', (data: IJankenSelect) => { + console.log('janken', data); + if (playerOne === data.userName) { + playerOneOption = data.option; + } else if (playerTwo === data.userName) { + playerTwoOption = data.option; + } + console.log('playerOneOption',playerOneOption); + console.log('playerTwoOption',playerTwoOption); + if (playerOneOption !== '' && playerTwoOption !== '') { + const message: IJankenResult = { + playerOne, + playerOneOption, + playerTwo, + playerTwoOption + } + io.emit('jankenResult', message); + } + }); + socket.on('registerUser', (data: string) => { + console.log('registerUser', data); + if (playerOne === '') { + playerOne = data; + socket.emit('registerUser', data); + } else if (playerTwo === '') { + playerTwo = data; + socket.emit('registerUser', data); + } + const message = { + playerOne: playerOne, + playerTwo: playerTwo, + }; + console.log() + io.emit('login', message); + }); + socket.on('moveToStage', () => { + console.log('moveToStage'); + stages = shuffle(defaultStages); + currentIndex = 0; + io.emit('stages', stages); + }); + socket.on('nextIndex', () => { + console.log('nextIndex'); + if (currentIndex < stages.length) { + currentIndex += 1; + io.emit('updateIndex', currentIndex); + } + }); + socket.on('againGame', () => { + console.log('againGame'); + io.emit('againGame'); + playerOneOption = ''; + playerTwoOption = ''; + }); + socket.on('previousIndex', () => { + console.log('previousIndex'); + if (currentIndex > 0) { + currentIndex -= 1; + io.emit('updateIndex', currentIndex); + } + }); + if (!room) { + // create new room + initRoom(); + room = true; + const message = { + playerOne: '', + playerTwo: '', + }; + socket.emit('login', message); + } + else { + if (playerOne === '' || playerTwo === '' || playerOneOption === '' || playerTwoOption === '') { + const message = { + playerOne: playerOne, + playerTwo: playerTwo, + }; + socket.emit('login', message); + } else { + const message = { + stages, + currentIndex + } + socket.emit('stages', message); + } + } + +}); +const shuffle = (array: string[]): string[] => { + return array.sort(() => Math.random() - 0.5); +}; + +const initRoom = (): void => { + playerOne = ''; + playerTwo = ''; + playerOneOption = ''; + playerTwoOption = ''; +}; diff --git a/server/src/models/index.ts b/main-web/server/src/models/index.ts similarity index 100% rename from server/src/models/index.ts rename to main-web/server/src/models/index.ts diff --git a/main-web/server/src/models/message.ts b/main-web/server/src/models/message.ts new file mode 100644 index 0000000..d020d11 --- /dev/null +++ b/main-web/server/src/models/message.ts @@ -0,0 +1,20 @@ +export interface ILoginMessage { + playerOne: string; + playerTwo: string; +} + +export interface IJankenResult { + playerOne: string; + playerTwo: string; + playerOneOption: string; + playerTwoOption: string; +} + +export interface ILogin { + userName: string; +} + +export interface IJankenSelect { + userName: string; + option: string; +} diff --git a/server/src/test.ts b/main-web/server/src/test.ts similarity index 100% rename from server/src/test.ts rename to main-web/server/src/test.ts diff --git a/server/tsconfig.json b/main-web/server/tsconfig.json similarity index 100% rename from server/tsconfig.json rename to main-web/server/tsconfig.json diff --git a/server/tslint.json b/main-web/server/tslint.json similarity index 100% rename from server/tslint.json rename to main-web/server/tslint.json diff --git a/tools/client/.env b/tools/client/.env new file mode 100644 index 0000000..6788ca8 --- /dev/null +++ b/tools/client/.env @@ -0,0 +1 @@ +REACT_APP_WEBSOCKET=ws://localhost:8080 \ No newline at end of file diff --git a/tools/client/.env.production b/tools/client/.env.production new file mode 100644 index 0000000..ccbba82 --- /dev/null +++ b/tools/client/.env.production @@ -0,0 +1 @@ +REACT_APP_WEBSOCKET=wss://www.catherine-fc.com/ \ No newline at end of file diff --git a/tools/client/.gitignore b/tools/client/.gitignore new file mode 100644 index 0000000..4d29575 --- /dev/null +++ b/tools/client/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/tools/client/README.md b/tools/client/README.md new file mode 100644 index 0000000..74735dc --- /dev/null +++ b/tools/client/README.md @@ -0,0 +1,44 @@ +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.
+Open [http://localhost:3000](http://localhost:3000) to view it in the browser. + +The page will reload if you make edits.
+You will also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.
+See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.
+It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can’t go back!** + +If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. + +You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). diff --git a/tools/client/package.json b/tools/client/package.json new file mode 100644 index 0000000..0c0dc5b --- /dev/null +++ b/tools/client/package.json @@ -0,0 +1,50 @@ +{ + "name": "catherine-janken", + "version": "0.1.0", + "private": true, + "dependencies": { + "dotenv": "^8.2.0", + "node-sass": "^4.13.1", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-scripts": "3.4.1", + "semantic-ui-css": "^2.4.1", + "semantic-ui-react": "^0.88.2", + "socket.io-client": "^2.3.0", + "typescript": "^3.7.5" + }, + "devDependencies": { + "@testing-library/jest-dom": "^4.2.4", + "@testing-library/react": "^9.5.0", + "@testing-library/user-event": "^7.2.1", + "@types/jest": "^24.9.1", + "@types/node": "^12.12.53", + "@types/react": "^16.9.43", + "@types/react-dom": "^16.9.8", + "@types/socket.io-client": "^1.4.32", + "tslint": "^5.18.0", + "tslint-config-airbnb": "^5.11.1", + "tslint-react": "^4.0.0" + }, + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": "react-app" + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] + } +} diff --git a/tools/client/public/favicon.ico b/tools/client/public/favicon.ico new file mode 100644 index 0000000..bcd5dfd Binary files /dev/null and b/tools/client/public/favicon.ico differ diff --git a/tools/client/public/index.html b/tools/client/public/index.html new file mode 100644 index 0000000..cd26f98 --- /dev/null +++ b/tools/client/public/index.html @@ -0,0 +1,41 @@ + + + + + + + + + + + Catherine Janken + + + +
+ + + diff --git a/tools/client/public/logo192.png b/tools/client/public/logo192.png new file mode 100644 index 0000000..fc44b0a Binary files /dev/null and b/tools/client/public/logo192.png differ diff --git a/tools/client/public/logo512.png b/tools/client/public/logo512.png new file mode 100644 index 0000000..a4e47a6 Binary files /dev/null and b/tools/client/public/logo512.png differ diff --git a/tools/client/public/manifest.json b/tools/client/public/manifest.json new file mode 100644 index 0000000..080d6c7 --- /dev/null +++ b/tools/client/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/tools/client/public/robots.txt b/tools/client/public/robots.txt new file mode 100644 index 0000000..e9e57dc --- /dev/null +++ b/tools/client/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/tools/client/src/App.css b/tools/client/src/App.css new file mode 100644 index 0000000..55d25f2 --- /dev/null +++ b/tools/client/src/App.css @@ -0,0 +1,24 @@ +.App { + height: 100vh; + width: 100vw; + background-image: url('./straysheep.png') ; + background-size: cover; + background-repeat: none; +} + +.EnterButton { + display: flex; + height: 100%; + width: 100%; + justify-content: center; + align-items: center; +} + +.EnterButton > button { + height: 50px; + width: 150px; +} + +.HiddenExit { + display: none; +} \ No newline at end of file diff --git a/tools/client/src/App.test.tsx b/tools/client/src/App.test.tsx new file mode 100644 index 0000000..4db7ebc --- /dev/null +++ b/tools/client/src/App.test.tsx @@ -0,0 +1,9 @@ +import React from 'react'; +import { render } from '@testing-library/react'; +import App from './App'; + +test('renders learn react link', () => { + const { getByText } = render(); + const linkElement = getByText(/learn react/i); + expect(linkElement).toBeInTheDocument(); +}); diff --git a/tools/client/src/App.tsx b/tools/client/src/App.tsx new file mode 100644 index 0000000..a25071f --- /dev/null +++ b/tools/client/src/App.tsx @@ -0,0 +1,167 @@ +import React, { useState } from 'react'; +import './App.css'; +import 'semantic-ui-css/semantic.min.css'; +import socketIOClient from 'socket.io-client'; +import { ILoginMessage, IJankenResult, IJankenSelect } from './model/messages'; + +import { Button } from 'semantic-ui-react'; + +import { Janken } from './component/janken/Janken'; +import { Stage } from './component/stage/Stage'; + +function App(): JSX.Element { + + const [socket, setSocket] = useState(null); + const [stages, setStages] = useState([]); + const [currentUser, setCurrentUser] = useState(''); + const [currentPlayers, setCurrentPlayers] = useState({playerOne:'', playerTwo:''}); + const [currentIndex, setCurrentIndex] = useState(0); + const [jankenResult, setJankenResult] = useState(null); + + const join = (): void => { + const wsUrl: string | undefined = process.env.REACT_APP_WEBSOCKET; + if (wsUrl){ + const sock: SocketIOClient.Socket = socketIOClient(wsUrl); + sock.on('connect', () => { + if (sock.connected) { + console.log('接続!'); + } else if (sock.disconnected) { + setSocket(null); + setStages([]); + setCurrentUser(''); + setCurrentPlayers({playerOne:'', playerTwo:''}); + setCurrentIndex(0); + setJankenResult(null); + } else { + console.log('しらんがな', sock); + } + }); + sock.on('login', (data: ILoginMessage) => { + console.log(data); + setCurrentPlayers(data); + }); + sock.on('registerUser', (data: string) => { + console.log(data); + setCurrentUser(data); + }); + sock.on('jankenResult', (data: IJankenResult) => { + setJankenResult(data); + }); + sock.on('againGame', () => { + setJankenResult(null); + }); + sock.on('stages', (data: string[]) => { + setStages(data); + setCurrentIndex(0); + }); + sock.on('updateIndex', (data: number) => { + setCurrentIndex(data); + }); + sock.on('exitGame', () => { + setSocket(null); + setStages([]); + setCurrentUser(''); + setCurrentPlayers({playerOne:'', playerTwo:''}); + setCurrentIndex(0); + setJankenResult(null); + }); + setSocket(sock); + } + } + const janken = (option: string): void => { + if (socket && currentUser) { + const message: IJankenSelect = { + userName: currentUser, + option + }; + socket.emit('janken', message); + } + }; + const moveToStage = (): void => { + if (socket) { + socket.emit('moveToStage'); + } + }; + const registerUser = (username: string): void => { + if (socket) { + socket.emit('registerUser', username); + } + }; + const previousIndex = (): void => { + if (socket && currentIndex > 0) { + socket.emit('previousIndex'); + } + }; + const nextIndex = (): void => { + if (socket && currentIndex < stages.length) { + socket.emit('nextIndex'); + } + }; + const againGame = (): void => { + if (socket) { + socket.emit('againGame'); + } + }; + const exitGame = (): void => { + if (socket) { + socket.emit('exitGame'); + } + }; + const render = (): JSX.Element => { + if (socket === null) { + return ( +
+ +
+ ); + } else { + if (stages.length === 0) { + return ( + + ); + } else { + return ( + + ); + } + } + + }; + return ( +
+ {render()} +
+ +
+
+ ); + +} + +export default App; diff --git a/tools/client/src/component/janken/Janken.module.scss b/tools/client/src/component/janken/Janken.module.scss new file mode 100644 index 0000000..03d9378 --- /dev/null +++ b/tools/client/src/component/janken/Janken.module.scss @@ -0,0 +1,65 @@ +.playerOne { + font-size: large; + font-weight: bold; + margin: 50px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.jankenResult { + display:flex; + height: 200px; + width: 400px; + background-color: white; + border-radius: 20px; + padding: 30px; + margin-bottom: 40px; + justify-content: center; + align-items: center; +} +.playerOneName { + font-size: large; +} +.playerOneJankenResult { + display: relative; +} + +.playerTwo { + font-size: large; + font-weight: bold; + margin: 50px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +.playerTwoName { + display: relative; +} + +.playerTwoJankenResult { + display: relative; +} + +.displayNextButton { + display: relative; +} +.displayButtons { + display: relative; +} +.loginForm { + width: 500px; +} + +.jankenForm { + position: relative; +} +.flexCenter { + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/tools/client/src/component/janken/Janken.tsx b/tools/client/src/component/janken/Janken.tsx new file mode 100644 index 0000000..b37e5be --- /dev/null +++ b/tools/client/src/component/janken/Janken.tsx @@ -0,0 +1,145 @@ +import React, { FunctionComponent, useState } from 'react'; +import { Form, Input, Label, Button, Icon } from 'semantic-ui-react'; +import { ILoginMessage, IJankenResult } from '../../model/messages'; +import style from './Janken.module.scss'; + +type ComponentProps = { + currentUser: string; + currentPlayers: ILoginMessage; + jankenResults: IJankenResult | null; + janken: (option: string) => void; + onSubmit: (username: string) => void; + moveToStage: () => void; + againGame: () => void; +}; + +export const Janken: FunctionComponent = (props): JSX.Element => { + const { currentUser, currentPlayers, jankenResults, janken, onSubmit, moveToStage, againGame } = props; + const [userName, setUserName] = useState(''); + const getIcon = (result: string): JSX.Element | undefined => { + switch (result) { + case 'rock': + return (); + case 'paper': + return (); + case 'scissors': + return (); + default: + } + } + const renderButton = (): JSX.Element => { + if (jankenResults && jankenResults.playerOneOption === jankenResults.playerTwoOption) { + return ( + + ); + } else { + return ( + + ); + } + } + if (currentPlayers.playerOne === '' || currentPlayers.playerTwo === '') { + if (currentUser === '') { + return ( +
+
+ + + setUserName(e.target.value)} + /> + + +
+
+ ); + + } + return (<>); + + } else { + if (jankenResults === null) { + if (currentUser !== '') { + return ( +
+
+ + + + + + + +
+
+ ); + + } + return (<>); + } else { + // display result and next button + return ( +
+
+
+
+ {jankenResults.playerOne} +
+
+ {getIcon(jankenResults.playerOneOption)} +
+
+
+
+ {jankenResults.playerTwo} +
+
+ {getIcon(jankenResults.playerTwoOption)} +
+
+
+
+ {renderButton()} +
+
); + } + } +}; diff --git a/tools/client/src/component/stage/Stage.module.scss b/tools/client/src/component/stage/Stage.module.scss new file mode 100644 index 0000000..4f69ac7 --- /dev/null +++ b/tools/client/src/component/stage/Stage.module.scss @@ -0,0 +1,76 @@ +.stageScreen { + display: flex; + flex-direction: column; + height: 100%; + width: 100%; + align-items: center; +} +.topPage { + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100px; +} +.previousButton { + display: flex; + justify-content: center; + width: 25%; +} +.stageName { + display: flex; + justify-content: center; + color: white; + font-size: x-large; + width: 50%; +} +.nextButton { + display: flex; + justify-content: center; + width: 25%; +} +.exitButton { + position: relative; +} +@mixin stageImage($url) { + width: 1024px; + height: 480px; + margin: 40px; + background-image: url($url); + background-size: cover; + float: left; + +} +.cementery { + @include stageImage('../../static/img/01.png'); +} +.prison { + @include stageImage('../../static/img/02.png'); +} +.torture { + @include stageImage('../../static/img/03.png'); +} +.inquisition { + @include stageImage('../../static/img/04.png'); +} +.quadrangle { + @include stageImage('../../static/img/05.png'); +} +.clock { + @include stageImage('../../static/img/06.png'); +} +.spiral { + @include stageImage('../../static/img/07.png'); +} +.cathedral { + @include stageImage('../../static/img/08.png'); +} +.empireo { + @include stageImage('../../static/img/09.png'); +} +.close { + @include stageImage('../../static/img/10.png'); +} +.arrange { + @include stageImage('../../static/img/11.png'); +} \ No newline at end of file diff --git a/tools/client/src/component/stage/Stage.tsx b/tools/client/src/component/stage/Stage.tsx new file mode 100644 index 0000000..3af9d73 --- /dev/null +++ b/tools/client/src/component/stage/Stage.tsx @@ -0,0 +1,113 @@ +import React, { FunctionComponent } from 'react'; +import { Button } from 'semantic-ui-react'; +import style from './Stage.module.scss'; + +type ComponentProps = { + stages: string[]; + currentIndex: number; + previousIndex: () => void; + nextIndex: () => void; + exitGame: () => void; +}; + +export const Stage: FunctionComponent = (props): JSX.Element => { + const { stages, currentIndex, previousIndex, nextIndex, exitGame } = props; + const previousButton = (): JSX.Element | undefined => { + if (currentIndex > 0) { + return ( + + ); + } + }; + const nextButton = (): JSX.Element | undefined => { + if (currentIndex < (stages.length -1)) { + return ( + + ); + } + }; + const exitButton = (): JSX.Element | undefined => { + if (currentIndex === (stages.length - 1)) { + return ( + + ); + } + }; + const printStageName = (): string => { + switch (stages[currentIndex]) { + case 'cementery': { + return 'Underground Cementery ~地下墓地~'; + } + case 'prison': { + return 'Prison of Despair ~罪人監獄~'; + } + case 'torture': { + return 'Torture Chamber ~拷問刑場~'; + } + case 'inquisition': { + return 'Inquisition ~審問法廷~'; + } + case 'quadrangle': { + return 'Quadrangle ~暴風の中庭~'; + } + case 'clock': { + return 'Clock Tower ~時計塔~'; + } + case 'spiral': { + return 'Spiral Corridor ~祭壇への路~'; + } + case 'empireo': { + return 'The Empireo ~天上~'; + } + case 'cathedral': { + return 'The Cathedral ~大聖堂~'; + } + case 'close': { + return 'Close Encounter ~新天地~'; + } + case 'arrange': { + return 'Arrange ~アレンジ~'; + } + default: + return ''; + } + }; + return ( +
+
+
+ {previousButton()} +
+
+ {printStageName()} {`(${currentIndex + 1}/${stages.length})`} +
+
+ {nextButton()} +
+
+
+
+ {exitButton()} +
+
+ ); + +}; diff --git a/tools/client/src/index.css b/tools/client/src/index.css new file mode 100644 index 0000000..ec2585e --- /dev/null +++ b/tools/client/src/index.css @@ -0,0 +1,13 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} diff --git a/tools/client/src/index.tsx b/tools/client/src/index.tsx new file mode 100644 index 0000000..f5185c1 --- /dev/null +++ b/tools/client/src/index.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import * as serviceWorker from './serviceWorker'; + +ReactDOM.render( + + + , + document.getElementById('root') +); + +// If you want your app to work offline and load faster, you can change +// unregister() to register() below. Note this comes with some pitfalls. +// Learn more about service workers: https://bit.ly/CRA-PWA +serviceWorker.unregister(); diff --git a/tools/client/src/logo.svg b/tools/client/src/logo.svg new file mode 100644 index 0000000..6b60c10 --- /dev/null +++ b/tools/client/src/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/tools/client/src/model/messages.ts b/tools/client/src/model/messages.ts new file mode 100644 index 0000000..d020d11 --- /dev/null +++ b/tools/client/src/model/messages.ts @@ -0,0 +1,20 @@ +export interface ILoginMessage { + playerOne: string; + playerTwo: string; +} + +export interface IJankenResult { + playerOne: string; + playerTwo: string; + playerOneOption: string; + playerTwoOption: string; +} + +export interface ILogin { + userName: string; +} + +export interface IJankenSelect { + userName: string; + option: string; +} diff --git a/tools/client/src/react-app-env.d.ts b/tools/client/src/react-app-env.d.ts new file mode 100644 index 0000000..6431bc5 --- /dev/null +++ b/tools/client/src/react-app-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/tools/client/src/serviceWorker.ts b/tools/client/src/serviceWorker.ts new file mode 100644 index 0000000..b09523f --- /dev/null +++ b/tools/client/src/serviceWorker.ts @@ -0,0 +1,149 @@ +// This optional code is used to register a service worker. +// register() is not called by default. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on subsequent visits to a page, after all the +// existing tabs open on the page have been closed, since previously cached +// resources are updated in the background. + +// To learn more about the benefits of this model and instructions on how to +// opt-in, read https://bit.ly/CRA-PWA + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.0/8 are considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +type Config = { + onSuccess?: (registration: ServiceWorkerRegistration) => void; + onUpdate?: (registration: ServiceWorkerRegistration) => void; +}; + +export function register(config?: Config) { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL( + process.env.PUBLIC_URL, + window.location.href + ); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebook/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Let's check if a service worker still exists or not. + checkValidServiceWorker(swUrl, config); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://bit.ly/CRA-PWA' + ); + }); + } else { + // Is not localhost. Just register service worker + registerValidSW(swUrl, config); + } + }); + } +} + +function registerValidSW(swUrl: string, config?: Config) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + if (installingWorker == null) { + return; + } + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the updated precached content has been fetched, + // but the previous service worker will still serve the older + // content until all client tabs are closed. + console.log( + 'New content is available and will be used when all ' + + 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' + ); + + // Execute callback + if (config && config.onUpdate) { + config.onUpdate(registration); + } + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + + // Execute callback + if (config && config.onSuccess) { + config.onSuccess(registration); + } + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl: string, config?: Config) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl, { + headers: { 'Service-Worker': 'script' } + }) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + const contentType = response.headers.get('content-type'); + if ( + response.status === 404 || + (contentType != null && contentType.indexOf('javascript') === -1) + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl, config); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready + .then(registration => { + registration.unregister(); + }) + .catch(error => { + console.error(error.message); + }); + } +} diff --git a/tools/client/src/setupTests.ts b/tools/client/src/setupTests.ts new file mode 100644 index 0000000..74b1a27 --- /dev/null +++ b/tools/client/src/setupTests.ts @@ -0,0 +1,5 @@ +// jest-dom adds custom jest matchers for asserting on DOM nodes. +// allows you to do things like: +// expect(element).toHaveTextContent(/react/i) +// learn more: https://github.com/testing-library/jest-dom +import '@testing-library/jest-dom/extend-expect'; diff --git a/tools/client/src/static/img/01.png b/tools/client/src/static/img/01.png new file mode 100644 index 0000000..01a8150 Binary files /dev/null and b/tools/client/src/static/img/01.png differ diff --git a/tools/client/src/static/img/02.png b/tools/client/src/static/img/02.png new file mode 100644 index 0000000..2a320de Binary files /dev/null and b/tools/client/src/static/img/02.png differ diff --git a/tools/client/src/static/img/03.png b/tools/client/src/static/img/03.png new file mode 100644 index 0000000..a202d94 Binary files /dev/null and b/tools/client/src/static/img/03.png differ diff --git a/tools/client/src/static/img/04.png b/tools/client/src/static/img/04.png new file mode 100644 index 0000000..86da740 Binary files /dev/null and b/tools/client/src/static/img/04.png differ diff --git a/tools/client/src/static/img/05.png b/tools/client/src/static/img/05.png new file mode 100644 index 0000000..af2d4fc Binary files /dev/null and b/tools/client/src/static/img/05.png differ diff --git a/tools/client/src/static/img/06.png b/tools/client/src/static/img/06.png new file mode 100644 index 0000000..e0f9978 Binary files /dev/null and b/tools/client/src/static/img/06.png differ diff --git a/tools/client/src/static/img/07.png b/tools/client/src/static/img/07.png new file mode 100644 index 0000000..cef210d Binary files /dev/null and b/tools/client/src/static/img/07.png differ diff --git a/tools/client/src/static/img/08.png b/tools/client/src/static/img/08.png new file mode 100644 index 0000000..d628550 Binary files /dev/null and b/tools/client/src/static/img/08.png differ diff --git a/tools/client/src/static/img/09.png b/tools/client/src/static/img/09.png new file mode 100644 index 0000000..fa0bfcb Binary files /dev/null and b/tools/client/src/static/img/09.png differ diff --git a/tools/client/src/static/img/10.png b/tools/client/src/static/img/10.png new file mode 100644 index 0000000..b0aa55a Binary files /dev/null and b/tools/client/src/static/img/10.png differ diff --git a/tools/client/src/static/img/11.png b/tools/client/src/static/img/11.png new file mode 100644 index 0000000..e09530e Binary files /dev/null and b/tools/client/src/static/img/11.png differ diff --git a/tools/client/src/straysheep.png b/tools/client/src/straysheep.png new file mode 100644 index 0000000..ae2c22d Binary files /dev/null and b/tools/client/src/straysheep.png differ diff --git a/tools/client/tsconfig.json b/tools/client/tsconfig.json new file mode 100644 index 0000000..f2850b7 --- /dev/null +++ b/tools/client/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react" + }, + "include": [ + "src" + ] +}