From 1cdf5a34084f3b7a29918bf8e5126b1cf98550b9 Mon Sep 17 00:00:00 2001 From: bayan2002 Date: Tue, 11 Oct 2022 15:10:32 +0300 Subject: [PATCH] Edit client files and package json at the src folder --- Client/README.md | 46 --------------------------- Client/package.json | 9 ++---- Client/public/index.html | 29 ++--------------- Client/public/manifest.json | 25 --------------- Client/public/robots.txt | 3 -- Client/src/App.css | 38 ---------------------- Client/src/{App.tsx => App/index.tsx} | 2 +- Client/src/App/style.css | 0 Client/src/index.tsx | 3 -- package.json | 15 +++++---- 10 files changed, 14 insertions(+), 156 deletions(-) delete mode 100644 Client/README.md delete mode 100644 Client/public/manifest.json delete mode 100644 Client/public/robots.txt delete mode 100644 Client/src/App.css rename Client/src/{App.tsx => App/index.tsx} (86%) create mode 100644 Client/src/App/style.css diff --git a/Client/README.md b/Client/README.md deleted file mode 100644 index b87cb00..0000000 --- a/Client/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Getting Started with Create React App - -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/Client/package.json b/Client/package.json index 54d9be3..8dd7ff5 100644 --- a/Client/package.json +++ b/Client/package.json @@ -1,20 +1,15 @@ { - "name": "client", + "name": "bms", "version": "0.1.0", "private": true, "dependencies": { - "@testing-library/jest-dom": "^5.16.5", - "@testing-library/react": "^13.4.0", - "@testing-library/user-event": "^13.5.0", - "@types/jest": "^27.5.2", "@types/node": "^16.11.65", "@types/react": "^18.0.21", "@types/react-dom": "^18.0.6", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", - "typescript": "^4.8.4", - "web-vitals": "^2.1.4" + "typescript": "^4.8.4" }, "scripts": { "start": "react-scripts start", diff --git a/Client/public/index.html b/Client/public/index.html index 92d7d1f..05f53ca 100644 --- a/Client/public/index.html +++ b/Client/public/index.html @@ -1,5 +1,5 @@ - + @@ -10,34 +10,9 @@ content="Web site created using create-react-app" /> - - - - React App + BMS -
- diff --git a/Client/public/manifest.json b/Client/public/manifest.json deleted file mode 100644 index 080d6c7..0000000 --- a/Client/public/manifest.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "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/Client/public/robots.txt b/Client/public/robots.txt deleted file mode 100644 index e9e57dc..0000000 --- a/Client/public/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * -Disallow: diff --git a/Client/src/App.css b/Client/src/App.css deleted file mode 100644 index 74b5e05..0000000 --- a/Client/src/App.css +++ /dev/null @@ -1,38 +0,0 @@ -.App { - text-align: center; -} - -.App-logo { - height: 40vmin; - pointer-events: none; -} - -@media (prefers-reduced-motion: no-preference) { - .App-logo { - animation: App-logo-spin infinite 20s linear; - } -} - -.App-header { - background-color: #282c34; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: calc(10px + 2vmin); - color: white; -} - -.App-link { - color: #61dafb; -} - -@keyframes App-logo-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} diff --git a/Client/src/App.tsx b/Client/src/App/index.tsx similarity index 86% rename from Client/src/App.tsx rename to Client/src/App/index.tsx index 6ea4dd1..3db585b 100644 --- a/Client/src/App.tsx +++ b/Client/src/App/index.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import './App.css'; +import './style.css'; function App() { return ( diff --git a/Client/src/App/style.css b/Client/src/App/style.css new file mode 100644 index 0000000..e69de29 diff --git a/Client/src/index.tsx b/Client/src/index.tsx index ea63efe..3cc1aea 100644 --- a/Client/src/index.tsx +++ b/Client/src/index.tsx @@ -1,13 +1,10 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; -import './index.css'; import App from './App'; - const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( ); - diff --git a/package.json b/package.json index cd6f112..4d5715f 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,17 @@ { "name": "bms", "version": "1.0.0", - "description": "- Building owners and managers face hardships to manage users' services, their payment schedules, and their history manually. That would cause huge problems like wasting some time and effort. Managers encounter these problems to track the users' histories, and all of these operations are done with paperwork that is not durable.", + "description": "Building owners and managers face hardships to manage users' services, their payment schedules, and their history manually. That would cause huge problems like wasting some time and effort. Managers encounter these problems to track the users' histories, and all of these operations are done with paperwork that is not durable", "main": "index.js", "scripts": { - "start.server": "cross-env NODE_ENV=PRODUCTION ts-node-esm --transpile-only ./Server/index.ts", - "start.client": "cd Client && npm start", - "dev": "cross-env NODE_ENV=DEVELOPMENT ts-node-dev --respawn --transpile-only ./Server/index.ts", - "test": "cross-env NODE_ENV=TESTING jest", - "eslint:fix": "eslint --fix" + "start": "NODE_ENV=production node dist/index.js", + "dev": "cross-env NODE_ENV=development ts-node-dev server/index.ts", + "client": "cd client/ && npm start", + "test": "cross-env NODE_ENV=test jest -i", + "build": "tsc -p .", + "heroku-postbuild": "npm run build && cd client/ && npm i && npm run build", + "eslint:fix": "eslint --fix", + "lint": "eslint --ext .ts server/ && eslint --ext .tsx client/src/" }, "repository": { "type": "git",