Skip to content

Commit fe7400c

Browse files
developer-choi최유진
authored andcommitted
first commit
0 parents  commit fe7400c

File tree

14 files changed

+7999
-0
lines changed

14 files changed

+7999
-0
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": ["env", "react", "stage-1"]
3+
}

package-lock.json

Lines changed: 7788 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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "react-library",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"serve": "webpack-dev-server"
8+
},
9+
"keywords": [],
10+
"author": "YuJinChoe",
11+
"license": "ISC",
12+
"dependencies": {
13+
"babel": "^6.23.0",
14+
"react": "^16.12.0",
15+
"react-dom": "^16.12.0",
16+
"react-prop-types": "^0.4.0",
17+
"react-router-dom": "^5.1.2",
18+
"semantic-ui-react": "^0.88.2"
19+
},
20+
"devDependencies": {
21+
"babel-core": "^6.26.3",
22+
"babel-loader": "^7.1.5",
23+
"babel-preset-env": "^1.7.0",
24+
"babel-preset-react": "^6.24.1",
25+
"babel-preset-stage-1": "^6.24.1",
26+
"css-loader": "^3.4.2",
27+
"html-webpack-plugin": "^3.2.0",
28+
"style-loader": "^1.1.2",
29+
"webpack": "^4.41.5",
30+
"webpack-cli": "^3.3.10",
31+
"webpack-dev-server": "^3.10.1"
32+
}
33+
}

public/favicon.ico

55.7 KB
Binary file not shown.

public/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css"></link>
5+
<meta charset="UTF-8">
6+
<title>Hello World</title>
7+
</head>
8+
<body>
9+
<div id="root">
10+
</div>
11+
</body>
12+
</html>

react-library.iml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="sourceFolder" forTests="false" />
7+
</component>
8+
</module>

src/components/App.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from "react";
2+
import {Switch, BrowserRouter as Router, Route} from "react-router-dom";
3+
4+
import Home from "./Home";
5+
import DynamicPage from "./DynamicPage";
6+
import NoMatch from "./NoMatch";
7+
8+
const App = () => {
9+
return (
10+
<Router>
11+
<div>
12+
<Switch>
13+
<Route exact path = "/" component = {Home} />
14+
<Route exact path = "/dynamic" component = {DynamicPage} />
15+
<Route component = {NoMatch} />
16+
</Switch>
17+
</div>
18+
</Router>
19+
);
20+
};
21+
22+
export default App;

src/components/DynamicPage.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import Layout from "./Layout";
3+
import { Header } from "semantic-ui-react";
4+
5+
const DynamicPage = () => {
6+
return (
7+
<Layout>
8+
<Header as="h2">Dynamic Page</Header>
9+
<p>This page was loaded asynchronously</p>
10+
</Layout>
11+
);
12+
};
13+
14+
export default DynamicPage;

src/components/Home.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from "react";
2+
import {Link} from "react-router-dom";
3+
import Layout from "./Layout";
4+
5+
const Home = () => {
6+
return (
7+
<Layout>
8+
<p>Hello World of React and Webpack!</p>
9+
<p>
10+
<Link to="/dynamic">Navigate to Dynamic Page</Link>
11+
</p>
12+
</Layout>
13+
);
14+
};
15+
16+
export default Home;

src/components/Layout.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.pull-right {
2+
display: flex;
3+
justify-content: flex-end;
4+
}
5+
6+
.h1 {
7+
margin: 10px;
8+
}

0 commit comments

Comments
 (0)