Skip to content

Commit 7f65226

Browse files
committed
Initial Commit
1 parent ae17bdd commit 7f65226

File tree

11 files changed

+7688
-0
lines changed

11 files changed

+7688
-0
lines changed

.babelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/preset-react"
5+
]
6+
}
7+
8+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# .gitignore
2+
node_modules
3+
dist

.npmignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# .npmignore
2+
src
3+
examples
4+
.babelrc
5+
.gitignore
6+
webpack.config.js

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Elangovan
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

package.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "10secondsofcode",
3+
"version": "1.0.0",
4+
"description": "The team behind 10-seconds-of-code and official 10-seconds projects.",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"start": "webpack-dev-server --mode development ",
9+
"dev": "webpack --mode development --output ./dist/leaf.js",
10+
"build": "webpack --mode production --output ./dist/leaf.js"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/10secondsofcode/10secondsofcode.git"
15+
},
16+
"keywords": [
17+
"ReactJs",
18+
"Webpack4",
19+
"10secondsofcode"
20+
],
21+
"author": "Elangovan Shanthi",
22+
"license": "ISC",
23+
"bugs": {
24+
"url": "https://github.com/10secondsofcode/10secondsofcode.git/issues"
25+
},
26+
"homepage": "https://github.com/10secondsofcode/10secondsofcode.git#readme",
27+
"devDependencies": {
28+
"@babel/core": "^7.0.0",
29+
"@babel/preset-env": "^7.0.0",
30+
"@babel/preset-react": "^7.0.0",
31+
"babel-loader": "^8.0.2",
32+
"css-loader": "^1.0.0",
33+
"html-loader": "^0.5.5",
34+
"html-webpack-plugin": "^3.2.0",
35+
"mini-css-extract-plugin": "^0.4.2",
36+
"react": "^16.5.0",
37+
"react-dom": "^16.5.0",
38+
"webpack": "^4.17.2",
39+
"webpack-cli": "^3.1.0",
40+
"webpack-dev-server": "^3.1.8"
41+
}
42+
}

src/App.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import React from "react";
2+
import main from './main.css';
3+
4+
class App extends React.Component {
5+
constructor(props){
6+
super(props);
7+
this.state = {
8+
count : 0
9+
}
10+
this.increment = this.increment.bind(this);
11+
this.decrement = this.decrement.bind(this);
12+
}
13+
14+
increment() {
15+
this.setState(
16+
{count : this.state.count+1}
17+
);
18+
}
19+
20+
decrement() {
21+
this.setState(
22+
{count : this.state.count-1}
23+
);
24+
}
25+
26+
render() {
27+
return (
28+
<div>
29+
<Counter/>
30+
<Header/>
31+
<Content/>
32+
<Footer/>
33+
</div>
34+
);
35+
}
36+
}
37+
38+
class Counter extends React.Component{
39+
render(){
40+
return (
41+
<div>
42+
<h1>Simple Counter</h1>
43+
</div>
44+
);
45+
}
46+
}
47+
48+
class Header extends React.Component{
49+
render(){
50+
return (
51+
<div>
52+
<h1>Header sectionsr</h1>
53+
54+
</div>
55+
);
56+
}
57+
}
58+
59+
class Content extends React.Component{
60+
render(){
61+
return (
62+
<div>
63+
<h1>Content Sections</h1>
64+
</div>
65+
);
66+
}
67+
}
68+
69+
class Footer extends React.Component{
70+
render(){
71+
return (
72+
<div>
73+
<h1>Footer Content</h1>
74+
</div>
75+
);
76+
}
77+
}
78+
79+
export default App;

src/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<title>webpack 4 quickstart</title>
6+
</head>
7+
<body>
8+
<div id="app">
9+
</div>
10+
</body>
11+
</html>

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
import React from "react";
3+
import ReactDOM from "react-dom";
4+
import App from "./App";
5+
6+
ReactDOM.render(<App />, document.getElementById("app"));

src/main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
body {
2+
line-height: 2;
3+
}
4+
5+
6+
.materialize-red.lighten-5 {
7+
background-color: #fdeaeb !important; }
8+
9+
.materialize-red-text.text-lighten-5 {
10+
color: #fdeaeb !important; }

0 commit comments

Comments
 (0)