File tree Expand file tree Collapse file tree 6 files changed +81
-1
lines changed
Expand file tree Collapse file tree 6 files changed +81
-1
lines changed Original file line number Diff line number Diff line change 1+ .DS_Store
2+ node_modules
3+ npm-debug.log
4+ public
Original file line number Diff line number Diff line change 1- # workshop-react
1+ # Venntro Workshops: React.js
2+
3+ 1 . Install [ Brunch] ( http://brunch.io/ )
4+
5+ npm install -g brunch
6+
7+ 2 . Create a new project with this skeleton
8+
9+ brunch new gh:xiy/workshop-react APPNAME
10+
11+ 3 . Start watching with Brunch:
12+
13+ brunch watch --server
Original file line number Diff line number Diff line change 1+ var React = require ( "react" ) ;
2+
3+ var Tick = React . createClass ( {
4+ render : function ( ) {
5+ return (
6+ < div id = "tick" >
7+ < h1 > Tick Tock</ h1 >
8+ </ div >
9+ ) ;
10+ }
11+ } ) ;
12+
13+ React . render ( < Tick /> , document . getElementById ( "content" ) ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > Tick Tock</ title >
6+ < script src ="app.js "> </ script >
7+ </ head >
8+ < body >
9+ < div id ="content "> </ div >
10+ < script > require ( 'app' ) ; </ script >
11+ </ body >
12+ </ html >
Original file line number Diff line number Diff line change 1+ module . exports . config = {
2+ npm : {
3+ enabled : true
4+ } ,
5+
6+ files : {
7+ javascripts : {
8+ joinTo : 'app.js'
9+ }
10+ } ,
11+
12+ plugins : {
13+ babel : {
14+ pattern : / \. ( j s | j s x ) $ /
15+ }
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " " ,
3+ "version" : " 0.1.0" ,
4+ "author" : " " ,
5+ "license" : " " ,
6+ "scripts" : {
7+ "start" : " brunch watch --server"
8+ },
9+ "dependencies" : {
10+ "react" : " latest"
11+ },
12+ "overrides" : {
13+ "react" : {
14+ "main" : " dist/react.js"
15+ }
16+ },
17+ "devDependencies" : {
18+ "babel-brunch" : " ^5.1.2" ,
19+ "brunch" : " ^1.8.5"
20+ },
21+ "private" : true
22+ }
You can’t perform that action at this time.
0 commit comments