File tree 6 files changed +115
-0
lines changed
6 files changed +115
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Logs
2
+ logs
3
+ * .log
4
+
5
+ # Runtime data
6
+ pids
7
+ * .pid
8
+ * .seed
9
+
10
+ # Directory for instrumented libs generated by jscoverage/JSCover
11
+ lib-cov
12
+
13
+ # Coverage directory used by tools like istanbul
14
+ coverage
15
+
16
+ # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
17
+ .grunt
18
+
19
+ # node-waf configuration
20
+ .lock-wscript
21
+
22
+ # Compiled binary addons (http://nodejs.org/api/addons.html)
23
+ build /Release
24
+
25
+ # Dependency directory
26
+ # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27
+ node_modules
28
+ bower_components
29
+ # build result
30
+ build
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+
3
+ class App extends React . Component {
4
+ render ( ) {
5
+ return (
6
+ < div >
7
+ 欢迎来到菜鸟教程学习!!!
8
+ </ div >
9
+ ) ;
10
+ }
11
+ }
12
+
13
+ export default App ;
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
+ </ head >
6
+ < body >
7
+ < div id ="app "> </ div >
8
+ < script src ="index.js "> </ script >
9
+ </ body >
10
+ </ html >
Original file line number Diff line number Diff line change
1
+ /*
2
+ * @Author : huangchengdu
3
+ * @Date : 2017-01-05 21:08:25
4
+ * @Last Modified by: huangchengdu
5
+ * @Last Modified time: 2017-01-05 21:19:46
6
+ */
7
+
8
+ import React from 'react' ;
9
+ import ReactDOM from 'react-dom' ;
10
+ import App from './App.jsx' ;
11
+
12
+ ReactDOM . render ( < App /> , document . getElementById ( 'app' ) )
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " runoob-react-test" ,
3
+ "version" : " 1.0.0" ,
4
+ "description" : " " ,
5
+ "main" : " index.js" ,
6
+ "scripts" : {
7
+ "start" : " webpack-dev-server --hot"
8
+ },
9
+ "author" : " huangchengdu" ,
10
+ "license" : " ISC" ,
11
+ "dependencies" : {
12
+ "react" : " ^15.4.1" ,
13
+ "react-dom" : " ^15.4.1"
14
+ }
15
+ }
Original file line number Diff line number Diff line change
1
+ /*
2
+ * @Author : huangchengdu
3
+ * @Date : 2017-01-05 21:08:44
4
+ * @Last Modified by: huangchengdu
5
+ * @Last Modified time: 2017-01-05 21:21:22
6
+ */
7
+
8
+ var config = {
9
+ entry : './main.js' ,
10
+
11
+ output : {
12
+ path :'./' ,
13
+ filename : 'index.js' ,
14
+ } ,
15
+
16
+ devServer : {
17
+ inline : true ,
18
+ port : 7777
19
+ } ,
20
+
21
+ module : {
22
+ loaders : [ {
23
+ test : / \. j s x ? $ / ,
24
+ exclude : / n o d e _ m o d u l e s / ,
25
+ loader : 'babel' ,
26
+
27
+ query : {
28
+ presets : [ 'es2015' , 'react' ]
29
+ }
30
+ } ]
31
+ }
32
+
33
+ }
34
+
35
+ module . exports = config ;
You can’t perform that action at this time.
0 commit comments