Skip to content

Commit 11953cd

Browse files
committed
feat: base setting
1 parent 2d93406 commit 11953cd

22 files changed

+29298
-0
lines changed

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"singleQuote": true,
5+
"trailingComma": "es5",
6+
"semi": true,
7+
"arrowParens": "always",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false
10+
}

package-lock.json

Lines changed: 17537 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"name": "react-virtualized-samples",
3+
"version": "0.1.0",
4+
"private": true,
5+
"dependencies": {
6+
"@chakra-ui/icons": "^1.0.13",
7+
"@chakra-ui/react": "^1.6.4",
8+
"@emotion/react": "^11.4.0",
9+
"@emotion/styled": "^11.3.0",
10+
"classnames": "^2.3.1",
11+
"framer-motion": "^4.1.17",
12+
"gh-pages": "^3.2.3",
13+
"node-sass": "^5.0.0",
14+
"react": "^17.0.2",
15+
"react-dom": "^17.0.2",
16+
"react-router-dom": "^5.2.0",
17+
"react-scripts": "4.0.3",
18+
"react-virtualized": "^9.22.3",
19+
"typescript": "^4.1.2",
20+
"web-vitals": "^1.0.1"
21+
},
22+
"devDependencies": {
23+
"@testing-library/jest-dom": "^5.11.4",
24+
"@testing-library/react": "^11.1.0",
25+
"@testing-library/user-event": "^12.1.10",
26+
"@types/jest": "^26.0.15",
27+
"@types/lodash-es": "^4.17.4",
28+
"@types/node": "^12.0.0",
29+
"@types/react": "^17.0.0",
30+
"@types/react-dom": "^17.0.0",
31+
"@types/react-router-dom": "^5.1.8",
32+
"@types/react-virtualized": "^9.21.12"
33+
},
34+
"scripts": {
35+
"start": "react-scripts start",
36+
"build": "react-scripts build",
37+
"test": "react-scripts test",
38+
"eject": "react-scripts eject",
39+
"deploy": "gh-pages -d build",
40+
"build:deploy": "react-scripts build && gh-pages -d build"
41+
},
42+
"eslintConfig": {
43+
"extends": [
44+
"react-app",
45+
"react-app/jest"
46+
]
47+
},
48+
"browserslist": {
49+
"production": [
50+
">0.2%",
51+
"not dead",
52+
"not op_mini all"
53+
],
54+
"development": [
55+
"last 1 chrome version",
56+
"last 1 firefox version",
57+
"last 1 safari version"
58+
]
59+
}
60+
}

public/favicon.ico

3.78 KB
Binary file not shown.

public/index.html

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1" />
7+
<meta name="theme-color" content="#000000" />
8+
<meta
9+
name="description"
10+
content="Web site created using create-react-app"
11+
/>
12+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13+
<!--
14+
manifest.json provides metadata used when your web app is installed on a
15+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16+
-->
17+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18+
<!--
19+
Notice the use of %PUBLIC_URL% in the tags above.
20+
It will be replaced with the URL of the `public` folder during the build.
21+
Only files inside the `public` folder can be referenced from the HTML.
22+
23+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24+
work correctly both with client-side routing and a non-root public URL.
25+
Learn how to configure a non-root public URL by running `npm run build`.
26+
-->
27+
<title>React App</title>
28+
</head>
29+
<body>
30+
<noscript>You need to enable JavaScript to run this app.</noscript>
31+
<div id="root"></div>
32+
<!--
33+
This HTML file is a template.
34+
If you open it directly in the browser, you will see an empty page.
35+
36+
You can add webfonts, meta tags, or analytics to this file.
37+
The build step will place the bundled scripts into the <body> tag.
38+
39+
To begin the development, run `npm start` or `yarn start`.
40+
To create a production bundle, use `npm run build` or `yarn build`.
41+
-->
42+
</body>
43+
</html>

public/logo192.png

5.22 KB
Loading

public/logo512.png

9.44 KB
Loading

public/manifest.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

public/robots.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

src/App.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
2+
import { ChakraProvider, Flex, Container, Menu, MenuButton, MenuList, MenuItem, IconButton } from '@chakra-ui/react';
3+
4+
import { HamburgerIcon } from '@chakra-ui/icons';
5+
import TextList from './pages/TextList';
6+
import ImageList from './pages/ImageList';
7+
8+
const App = () => {
9+
return (
10+
<ChakraProvider>
11+
<Flex>
12+
<Container width="700px">
13+
<Router>
14+
<Container>
15+
<Menu>
16+
<MenuButton as={IconButton} aria-label="Options" icon={<HamburgerIcon />} variant="outline" />
17+
<MenuList>
18+
<MenuItem>기본 리스트</MenuItem>
19+
<MenuItem>적용된 리스트</MenuItem>
20+
</MenuList>
21+
</Menu>
22+
</Container>
23+
<Switch>
24+
<Route exact path="/" component={TextList} />
25+
<Route path="/text-list" component={TextList} />
26+
<Route path="/image-list" component={ImageList} />
27+
<Redirect to="/" />
28+
</Switch>
29+
</Router>
30+
</Container>
31+
</Flex>
32+
</ChakraProvider>
33+
);
34+
};
35+
36+
export default App;

src/index.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import ReactDOM from 'react-dom';
3+
import App from './App';
4+
5+
import './styles/index.scss';
6+
7+
ReactDOM.render(
8+
<React.StrictMode>
9+
<App />
10+
</React.StrictMode>,
11+
document.getElementById('root')
12+
);

src/react-app-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="react-scripts" />

src/setupTests.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
2+
// allows you to do things like:
3+
// expect(element).toHaveTextContent(/react/i)
4+
// learn more: https://github.com/testing-library/jest-dom
5+
import '@testing-library/jest-dom';

src/styles/index.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@import './modules/init';
2+
@import './modules/base';

src/styles/modules/base.scss

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@import url('https://fonts.googleapis.com/css?family=Noto+Sans|Noto+Sans+KR');
2+
@import './variables.scss';
3+
4+
$bg-color: #3068cc;
5+
6+
body {
7+
line-height: 1.6;
8+
font-size: $font-size-default;
9+
font-family: 'Noto Sans KR', 'Noto Sans', 'Malgun Gothic', sans-serif;
10+
color: $black;
11+
background: $bg-color;
12+
}

src/styles/modules/init.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
box-sizing: border-box;
5+
border: 0;
6+
font-family: system-ui, 'AppleSDGothicNeo', sans-serif;
7+
font-style: normal;
8+
word-wrap: break-word;
9+
word-break: keep-all;
10+
hyphens: auto;
11+
}
12+
13+
*:focus {
14+
outline: none;
15+
}
16+
17+
input {
18+
&:disabled {
19+
background-color: #ebebe4;
20+
}
21+
}
22+
23+
button {
24+
cursor: pointer;
25+
border: 0;
26+
background: none;
27+
}

src/styles/modules/mixin.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
@mixin flex-center-vertical($justifyContent: space-between) {
2+
display: flex;
3+
flex-direction: column;
4+
justify-content: $justifyContent;
5+
}
6+
7+
@mixin flex-center() {
8+
display: flex;
9+
justify-content: center;
10+
align-items: center;
11+
}
12+
13+
@mixin ellipsis() {
14+
text-overflow: ellipsis;
15+
overflow: hidden;
16+
white-space: nowrap;
17+
}

src/styles/modules/variables.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// color
2+
$blue: #3068cc;
3+
$gray: #d6d6d6;
4+
$black: #222;
5+
$white: #fff;
6+
$gold-1: rgb(255, 236, 126);
7+
$gold-2: gold;
8+
$error: #d50000;
9+
10+
// font
11+
$font-size-default: 16px;

src/types/index.d.ts

Whitespace-only changes.

tsconfig.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es5",
4+
"lib": [
5+
"dom",
6+
"dom.iterable",
7+
"esnext"
8+
],
9+
"allowJs": true,
10+
"skipLibCheck": true,
11+
"esModuleInterop": true,
12+
"allowSyntheticDefaultImports": true,
13+
"strict": true,
14+
"forceConsistentCasingInFileNames": true,
15+
"noFallthroughCasesInSwitch": true,
16+
"module": "esnext",
17+
"moduleResolution": "node",
18+
"resolveJsonModule": true,
19+
"isolatedModules": true,
20+
"noEmit": true,
21+
"jsx": "react-jsx"
22+
},
23+
"include": [
24+
"src"
25+
]
26+
}

0 commit comments

Comments
 (0)