Skip to content

Commit

Permalink
chore: [FE] 프론트엔드 환경설정 변경
Browse files Browse the repository at this point in the history
- React를 이용하지 않고, Vanila JS로 구현하기로 결정하여 프로젝트 구조를
  변경
  • Loading branch information
wooojini committed Nov 23, 2020
1 parent d376fcf commit 0c9fc8c
Show file tree
Hide file tree
Showing 34 changed files with 3,469 additions and 6,825 deletions.
3 changes: 2 additions & 1 deletion frontend/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module.exports = {
'react/jsx-closing-bracket-location': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off'
'@typescript-eslint/no-unused-vars': 'off',
'no-useless-constructor': 'off'
}
};
File renamed without changes.
9,747 changes: 3,246 additions & 6,501 deletions frontend/package-lock.json

Large diffs are not rendered by default.

56 changes: 31 additions & 25 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,49 @@
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.32",
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.12",
"typescript": "^4.0.5"
},
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.5",
"@babel/preset-typescript": "^7.12.7",
"@testing-library/jest-dom": "^5.11.6",
"@testing-library/react": "^11.2.0",
"@testing-library/user-event": "^12.2.2",
"@types/jest": "^26.0.15",
"@types/node": "^12.19.5",
"@types/react": "^16.9.56",
"@types/react-dom": "^16.9.9",
"@types/react-redux": "^7.1.11",
"@types/react-router-dom": "^5.1.6",
"@types/styled-components": "^5.1.4",
"@typescript-eslint/eslint-plugin": "^4.8.1",
"@typescript-eslint/parser": "^4.8.1",
"@types/jest": "^26.0.15",
"@types/node": "^12.19.5",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"core-js": "^3.6.5",
"css-loader": "^4.3.0",
"dotenv": "^8.2.0",
"eslint": "^7.13.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"file-loader": "^6.1.0",
"html-webpack-plugin": "^4.5.0",
"jest": "^26.6.3",
"mini-css-extract-plugin": "^0.11.2",
"prettier": "^2.1.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-redux": "^7.2.2",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.0",
"styled-components": "^5.2.1",
"styled-reset": "^4.3.1",
"typescript": "^4.0.5",
"web-vitals": "^0.2.4"
"sass": "^1.26.11",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"ts-jest": "^26.4.4",
"url-loader": "^4.1.0",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0",
"webpack-merge": "^5.4.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"dev": "webpack-dev-server --env.ENVIRONMENT=development",
"build": "webpack --mode production --devtool hidden-source-map --env.ENVIRONMENT=production",
"test": "jest"
},
"eslintConfig": {
"extends": []
Expand Down
Binary file removed frontend/public/favicon.ico
Binary file not shown.
45 changes: 8 additions & 37 deletions frontend/public/index.html
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.

Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
<body>
<audio-editor-app id=root></audio-editor-app>
</body>

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
Binary file removed frontend/public/logo192.png
Binary file not shown.
Binary file removed frontend/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions frontend/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/public/robots.txt

This file was deleted.

9 changes: 0 additions & 9 deletions frontend/src/__test__/App.test.tsx

This file was deleted.

14 changes: 14 additions & 0 deletions frontend/src/__test__/sample.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
describe('Sample Test', () => {
beforeAll(async () => {
console.log('사전작업');
});

test('Sample Test', async () => {
// given

// when

// then
expect(1).toEqual(1);
});
});
22 changes: 22 additions & 0 deletions frontend/src/components/audio-editor-app/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export {};

(() => {
const AudioEditorApp = class extends HTMLElement {
constructor() {
super();
}

connectedCallback() {
this.render();
}

render() {
this.innerHTML = `
<div>
<sample-component></sample-component>
</div>
`;
}
};
customElements.define('audio-editor-app', AudioEditorApp);
})();
3 changes: 2 additions & 1 deletion frontend/src/components/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as GlobalStyle } from './GlobalStyle';
import './audio-editor-app';
import './sample-component';
23 changes: 23 additions & 0 deletions frontend/src/components/sample-component/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export {};

(() => {
const SampleComponent = class extends HTMLElement {
public text: string;

constructor() {
super();
this.text = 'test';
}

connectedCallback() {
this.render();
}

render() {
this.innerHTML = `
<h1>${this.text}</h1>
`;
}
};
customElements.define('sample-component', SampleComponent);
})();
5 changes: 0 additions & 5 deletions frontend/src/config/index.js

This file was deleted.

1 change: 1 addition & 0 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@components';
10 changes: 0 additions & 10 deletions frontend/src/index.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions frontend/src/pages/LoginPage.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions frontend/src/pages/MainPage.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions frontend/src/pages/index.tsx

This file was deleted.

1 change: 0 additions & 1 deletion frontend/src/react-app-env.d.ts

This file was deleted.

55 changes: 0 additions & 55 deletions frontend/src/root/GlobalStyle.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions frontend/src/root/Root.tsx

This file was deleted.

Loading

0 comments on commit 0c9fc8c

Please sign in to comment.