Skip to content

Commit c754b10

Browse files
committed
finish setup
"
0 parents  commit c754b10

File tree

7 files changed

+5238
-0
lines changed

7 files changed

+5238
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
.DS_Store
3+
dist

app/app.css

Whitespace-only changes.

app/index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7+
<title>Application</title>
8+
</head>
9+
<body>
10+
<div id="app">
11+
</div>
12+
</body>
13+
</html>

app/index.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const React = require('react');
2+
const ReactDOM = require('react-dom');
3+
require('./app.css');
4+
class App extends React.Component {
5+
render() {
6+
return <div>Hello WOrld</div>;
7+
}
8+
}
9+
10+
ReactDOM.render(<App />, document.getElementById('app'));

package.json

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "gitfight",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"babel": {
7+
"presets": [
8+
"@babel/preset-env",
9+
"@babel/preset-react"
10+
]
11+
},
12+
"scripts": {
13+
"dev": "webpack -w"
14+
},
15+
"keywords": [],
16+
"author": "",
17+
"license": "ISC",
18+
"dependencies": {
19+
"react": "^16.7.0",
20+
"react-dom": "^16.7.0"
21+
},
22+
"devDependencies": {
23+
"@babel/core": "^7.2.2",
24+
"@babel/preset-env": "^7.3.1",
25+
"@babel/preset-react": "^7.0.0",
26+
"babel-loader": "^8.0.5",
27+
"css-loader": "^2.1.0",
28+
"html-webpack-plugin": "^3.2.0",
29+
"style-loader": "^0.23.1",
30+
"webpack": "^4.29.1",
31+
"webpack-cli": "^3.2.3",
32+
"webpack-dev-server": "^3.1.14"
33+
}
34+
}

webpack.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const path = require('path');
2+
const HtmlWebpackPlugin = require('html-webpack-plugin');
3+
module.exports = {
4+
entry: './app/index.js',
5+
output: {
6+
path: path.resolve(__dirname, 'dist'),
7+
filename: 'index_bundle.js'
8+
},
9+
module: {
10+
rules: [
11+
{ test: /\.(js)$/, use: 'babel-loader' },
12+
{ test: /\.css$/, use: ['style-loader', 'css-loader'] }
13+
]
14+
},
15+
mode: 'development',
16+
plugins: [
17+
new HtmlWebpackPlugin({
18+
template: 'app/index.html'
19+
})
20+
]
21+
};

0 commit comments

Comments
 (0)