File tree Expand file tree Collapse file tree 8 files changed +135
-0
lines changed Expand file tree Collapse file tree 8 files changed +135
-0
lines changed Original file line number Diff line number Diff line change 1+ { "presets" : [" react" , " es2015" ] }
Original file line number Diff line number Diff line change 1+ * .swp
2+ node_modules /**
3+ dist /**
Original file line number Diff line number Diff line change 1+ version : ' 2'
2+ services :
3+ iClientReact :
4+ image : node:6.7.0
5+ container_name : iClientReact
6+ restart : always
7+ ports :
8+ - " 8081:80"
9+ volumes :
10+ - ./:/client
11+ tty : true
12+
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > React Client</ title >
6+ < link rel ="stylesheet " href ="node_modules/bulma/css/bulma.css ">
7+ < link rel ="stylesheet " href ="node_modules/font-awesome/css/font-awesome.min.css ">
8+ </ head >
9+ < body >
10+ < div id ="app "> </ div >
11+ < script src ="dist/bundle.js "> </ script >
12+ </ body >
13+ </ html >
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " client" ,
3+ "version" : " 1.0.0" ,
4+ "description" : " " ,
5+ "main" : " index.js" ,
6+ "dependencies" : {
7+ "axios" : " ^0.14.0" ,
8+ "bulma" : " ^0.2.1" ,
9+ "font-awesome" : " ^4.6.3" ,
10+ "react" : " ^15.3.2" ,
11+ "react-dom" : " ^15.3.2"
12+ },
13+ "devDependencies" : {
14+ "babel-core" : " ^6.17.0" ,
15+ "babel-loader" : " ^6.2.5" ,
16+ "babel-preset-es2015" : " ^6.16.0" ,
17+ "babel-preset-react" : " ^6.16.0" ,
18+ "css-loader" : " ^0.25.0" ,
19+ "http-server" : " ^0.9.0" ,
20+ "npm-run-all" : " ^3.1.0" ,
21+ "style-loader" : " ^0.13.1" ,
22+ "webpack" : " ^1.13.2"
23+ },
24+ "scripts" : {
25+ "test" : " echo \" Error: no test specified\" && exit 1" ,
26+ "webpack" : " webpack -w" ,
27+ "serve" : " http-server -o -c 1 -p 80" ,
28+ "dev" : " npm-run-all --parallel webpack serve"
29+ },
30+ "author" : " " ,
31+ "license" : " ISC"
32+ }
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+
3+ class HomeComponent extends React . Component {
4+ constructor ( props ) {
5+ super ( props ) ;
6+ }
7+
8+ render ( ) {
9+ return (
10+ < section className = "hero is-fullheight is-primary" >
11+ < div className = "hero-body" >
12+ < div className = "container" >
13+ < div className = "columns is-vcentered" >
14+ < div className = "column is-4 is-offset-4" >
15+ < h1 className = "title has-text-centered" >
16+ IClient
17+ </ h1 >
18+ < form onSubmit = { this . handleSubmit } >
19+ < div className = "box" >
20+ < label className = "label" > Email</ label >
21+ < p className = "control" >
22+ < input className = "input" type = "text" placeholder = "[email protected] " /> 23+ </ p >
24+ < label className = "label" > Password</ label >
25+ < p className = "control" >
26+ < input className = "input" type = "password" placeholder = "●●●●●●●" />
27+ </ p >
28+ < hr />
29+ < p className = "control" >
30+ < button className = "button is-primary" > Login</ button >
31+ < button className = "button is-default" > Cancel</ button >
32+ </ p >
33+ < p className = "has-text-centered" >
34+ < a href = "register.html" > Register an Account</ a >
35+ |
36+ < a href = "#" > Forgot password</ a >
37+ </ p >
38+ </ div >
39+ </ form >
40+ </ div >
41+ </ div >
42+ </ div >
43+ </ div >
44+ </ section >
45+ ) ;
46+ }
47+ }
48+
49+ export default HomeComponent ;
Original file line number Diff line number Diff line change 1+ import React from 'react' ;
2+ import ReactDOM from 'react-dom' ;
3+
4+ import HomeComponent from './components/Home/HomeComponent' ;
5+
6+ ReactDOM . render ( < HomeComponent /> , document . getElementById ( 'app' ) ) ;
Original file line number Diff line number Diff line change 1+ module . exports = {
2+ entry : "./src/main.js" ,
3+ output : {
4+ filename : "dist/bundle.js"
5+ } ,
6+ module : {
7+ loaders : [
8+ { test : / \. c s s $ / , loader : "style-loader!css-loader" } ,
9+ {
10+ test : / \. j s $ / ,
11+ exclude : / n o d e _ m o d u l e s / ,
12+ loader : 'babel' ,
13+ query : {
14+ presets : [ 'react' , 'es2015' ]
15+ }
16+ }
17+ ]
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments