浏览代码

Revert "add code folder to contain all the code/exercises for each lessons"

This reverts commit 07a3113bfe4763ceabde1b044c2ac4c90e5f3a21.
Ryan Florence 9 年之前
父节点
当前提交
2fc7ca6a29
共有 100 个文件被更改,包括 0 次插入1319 次删除
  1. 0 7
      code/01-setting-up/index.html
  2. 0 4
      code/01-setting-up/index.js
  3. 0 8
      code/01-setting-up/modules/App.js
  4. 0 25
      code/01-setting-up/package.json
  5. 0 15
      code/01-setting-up/webpack.config.js
  6. 0 7
      code/02-rendering-a-router/index.html
  7. 0 4
      code/02-rendering-a-router/index.js
  8. 0 8
      code/02-rendering-a-router/modules/App.js
  9. 0 25
      code/02-rendering-a-router/package.json
  10. 0 15
      code/02-rendering-a-router/webpack.config.js
  11. 0 7
      code/03-navigating-with-link/index.html
  12. 0 15
      code/03-navigating-with-link/index.js
  13. 0 8
      code/03-navigating-with-link/modules/About.js
  14. 0 8
      code/03-navigating-with-link/modules/App.js
  15. 0 8
      code/03-navigating-with-link/modules/Repos.js
  16. 0 25
      code/03-navigating-with-link/package.json
  17. 0 15
      code/03-navigating-with-link/webpack.config.js
  18. 0 7
      code/04-nested-routes/index.html
  19. 0 15
      code/04-nested-routes/index.js
  20. 0 8
      code/04-nested-routes/modules/About.js
  21. 0 17
      code/04-nested-routes/modules/App.js
  22. 0 8
      code/04-nested-routes/modules/Repos.js
  23. 0 25
      code/04-nested-routes/package.json
  24. 0 15
      code/04-nested-routes/webpack.config.js
  25. 0 7
      code/05-active-links/index.html
  26. 0 16
      code/05-active-links/index.js
  27. 0 8
      code/05-active-links/modules/About.js
  28. 0 18
      code/05-active-links/modules/App.js
  29. 0 8
      code/05-active-links/modules/Repos.js
  30. 0 25
      code/05-active-links/package.json
  31. 0 15
      code/05-active-links/webpack.config.js
  32. 0 4
      code/06-params/index.css
  33. 0 8
      code/06-params/index.html
  34. 0 16
      code/06-params/index.js
  35. 0 8
      code/06-params/modules/About.js
  36. 0 18
      code/06-params/modules/App.js
  37. 0 10
      code/06-params/modules/NavLink.js
  38. 0 8
      code/06-params/modules/Repos.js
  39. 0 25
      code/06-params/package.json
  40. 0 15
      code/06-params/webpack.config.js
  41. 0 4
      code/07-more-nesting/index.css
  42. 0 8
      code/07-more-nesting/index.html
  43. 0 18
      code/07-more-nesting/index.js
  44. 0 8
      code/07-more-nesting/modules/About.js
  45. 0 18
      code/07-more-nesting/modules/App.js
  46. 0 10
      code/07-more-nesting/modules/NavLink.js
  47. 0 12
      code/07-more-nesting/modules/Repo.js
  48. 0 17
      code/07-more-nesting/modules/Repos.js
  49. 0 25
      code/07-more-nesting/package.json
  50. 0 15
      code/07-more-nesting/webpack.config.js
  51. 0 4
      code/08-index-routes/index.css
  52. 0 8
      code/08-index-routes/index.html
  53. 0 19
      code/08-index-routes/index.js
  54. 0 8
      code/08-index-routes/modules/About.js
  55. 0 18
      code/08-index-routes/modules/App.js
  56. 0 10
      code/08-index-routes/modules/NavLink.js
  57. 0 12
      code/08-index-routes/modules/Repo.js
  58. 0 18
      code/08-index-routes/modules/Repos.js
  59. 0 25
      code/08-index-routes/package.json
  60. 0 15
      code/08-index-routes/webpack.config.js
  61. 0 4
      code/09-index-links/index.css
  62. 0 8
      code/09-index-links/index.html
  63. 0 21
      code/09-index-links/index.js
  64. 0 8
      code/09-index-links/modules/About.js
  65. 0 18
      code/09-index-links/modules/App.js
  66. 0 8
      code/09-index-links/modules/Home.js
  67. 0 10
      code/09-index-links/modules/NavLink.js
  68. 0 12
      code/09-index-links/modules/Repo.js
  69. 0 18
      code/09-index-links/modules/Repos.js
  70. 0 25
      code/09-index-links/package.json
  71. 0 15
      code/09-index-links/webpack.config.js
  72. 0 4
      code/10-clean-urls/index.css
  73. 0 8
      code/10-clean-urls/index.html
  74. 0 21
      code/10-clean-urls/index.js
  75. 0 8
      code/10-clean-urls/modules/About.js
  76. 0 19
      code/10-clean-urls/modules/App.js
  77. 0 8
      code/10-clean-urls/modules/Home.js
  78. 0 10
      code/10-clean-urls/modules/NavLink.js
  79. 0 12
      code/10-clean-urls/modules/Repo.js
  80. 0 18
      code/10-clean-urls/modules/Repos.js
  81. 0 25
      code/10-clean-urls/package.json
  82. 0 15
      code/10-clean-urls/webpack.config.js
  83. 0 4
      code/11-productionish-server/index.css
  84. 0 8
      code/11-productionish-server/index.html
  85. 0 21
      code/11-productionish-server/index.js
  86. 0 8
      code/11-productionish-server/modules/About.js
  87. 0 19
      code/11-productionish-server/modules/App.js
  88. 0 8
      code/11-productionish-server/modules/Home.js
  89. 0 10
      code/11-productionish-server/modules/NavLink.js
  90. 0 12
      code/11-productionish-server/modules/Repo.js
  91. 0 18
      code/11-productionish-server/modules/Repos.js
  92. 0 25
      code/11-productionish-server/package.json
  93. 0 15
      code/11-productionish-server/webpack.config.js
  94. 0 21
      code/12-navigating/index.js
  95. 0 8
      code/12-navigating/modules/About.js
  96. 0 19
      code/12-navigating/modules/App.js
  97. 0 8
      code/12-navigating/modules/Home.js
  98. 0 10
      code/12-navigating/modules/NavLink.js
  99. 0 12
      code/12-navigating/modules/Repo.js
  100. 0 18
      code/12-navigating/modules/Repos.js

+ 0 - 7
code/01-setting-up/index.html

@@ -1,7 +0,0 @@
-<!doctype html public "storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 4
code/01-setting-up/index.js

@@ -1,4 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import App from './modules/App'
-render(<App/>, document.getElementById('app'))

+ 0 - 8
code/01-setting-up/modules/App.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Hello, React Router!</div>
-  }
-})
-

+ 0 - 25
code/01-setting-up/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/01-setting-up/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 7
code/02-rendering-a-router/index.html

@@ -1,7 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 4
code/02-rendering-a-router/index.js

@@ -1,4 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import App from './modules/App'
-render(<App/>, document.getElementById('app'))

+ 0 - 8
code/02-rendering-a-router/modules/App.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Hello, React Router!</div>
-  }
-})
-

+ 0 - 25
code/02-rendering-a-router/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0-rc6"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/02-rendering-a-router/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 7
code/03-navigating-with-link/index.html

@@ -1,7 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 15
code/03-navigating-with-link/index.js

@@ -1,15 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}/>
-    <Route path="/repos" component={Repos}/>
-    <Route path="/about" component={About}/>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/03-navigating-with-link/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 8
code/03-navigating-with-link/modules/App.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Hello, React Router!</div>
-  }
-})
-

+ 0 - 8
code/03-navigating-with-link/modules/Repos.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Repos</div>
-  }
-})
-

+ 0 - 25
code/03-navigating-with-link/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/03-navigating-with-link/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 7
code/04-nested-routes/index.html

@@ -1,7 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 15
code/04-nested-routes/index.js

@@ -1,15 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}/>
-    <Route path="/repos" component={Repos}/>
-    <Route path="/about" component={About}/>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/04-nested-routes/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 17
code/04-nested-routes/modules/App.js

@@ -1,17 +0,0 @@
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><Link to="/about">About</Link></li>
-          <li><Link to="/repos">Repos</Link></li>
-        </ul>
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/04-nested-routes/modules/Repos.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Repos</div>
-  }
-})
-

+ 0 - 25
code/04-nested-routes/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/04-nested-routes/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 7
code/05-active-links/index.html

@@ -1,7 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 16
code/05-active-links/index.js

@@ -1,16 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <Route path="/repos" component={Repos}/>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/05-active-links/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 18
code/05-active-links/modules/App.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><Link to="/about">About</Link></li>
-          <li><Link to="/repos">Repos</Link></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/05-active-links/modules/Repos.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Repos</div>
-  }
-})
-

+ 0 - 25
code/05-active-links/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/05-active-links/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/06-params/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/06-params/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=index.css>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 16
code/06-params/index.js

@@ -1,16 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <Route path="/repos" component={Repos}/>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/06-params/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 18
code/06-params/modules/App.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 10
code/06-params/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 8
code/06-params/modules/Repos.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Repos</div>
-  }
-})
-

+ 0 - 25
code/06-params/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/06-params/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/07-more-nesting/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/07-more-nesting/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=index.css>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 18
code/07-more-nesting/index.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <Route path="/repos" component={Repos}/>
-      <Route path="/repos/:userName/:repoName" component={Repo}/>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/07-more-nesting/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 18
code/07-more-nesting/modules/App.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 10
code/07-more-nesting/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/07-more-nesting/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 17
code/07-more-nesting/modules/Repos.js

@@ -1,17 +0,0 @@
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><Link to="/repos/rackt/react-router">React Router</Link></li>
-          <li><Link to="/repos/facebook/react">React</Link></li>
-        </ul>
-      </div>
-    )
-  }
-})
-

+ 0 - 25
code/07-more-nesting/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/07-more-nesting/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/08-index-routes/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/08-index-routes/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=index.css>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 19
code/08-index-routes/index.js

@@ -1,19 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <Route path="/repos" component={Repos}>
-        <Route path="/repos/:userName/:repoName" component={Repo}/>
-      </Route>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/08-index-routes/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 18
code/08-index-routes/modules/App.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 10
code/08-index-routes/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/08-index-routes/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 18
code/08-index-routes/modules/Repos.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><NavLink to="/repos/rackt/react-router">React Router</NavLink></li>
-          <li><NavLink to="/repos/facebook/react">React</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 25
code/08-index-routes/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/08-index-routes/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/09-index-links/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/09-index-links/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=index.css>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 21
code/09-index-links/index.js

@@ -1,21 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory, IndexRoute } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-import Home from './modules/Home'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <IndexRoute component={Home}/>
-      <Route path="/repos" component={Repos}>
-        <Route path="/repos/:userName/:repoName" component={Repo}/>
-      </Route>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/09-index-links/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 18
code/09-index-links/modules/App.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/09-index-links/modules/Home.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Home</div>
-  }
-})
-

+ 0 - 10
code/09-index-links/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/09-index-links/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 18
code/09-index-links/modules/Repos.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><NavLink to="/repos/rackt/react-router">React Router</NavLink></li>
-          <li><NavLink to="/repos/facebook/react">React</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 25
code/09-index-links/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/09-index-links/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/10-clean-urls/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/10-clean-urls/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=index.css>
-<div id=app></div>
-<script src="bundle.js"></script>
-

+ 0 - 21
code/10-clean-urls/index.js

@@ -1,21 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, hashHistory, IndexRoute } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-import Home from './modules/Home'
-
-render((
-  <Router history={hashHistory}>
-    <Route path="/" component={App}>
-      <IndexRoute component={Home}/>
-      <Route path="/repos" component={Repos}>
-        <Route path="/repos/:userName/:repoName" component={Repo}/>
-      </Route>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/10-clean-urls/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 19
code/10-clean-urls/modules/App.js

@@ -1,19 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/" onlyActiveOnIndex>Home</NavLink></li>
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/10-clean-urls/modules/Home.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Home</div>
-  }
-})
-

+ 0 - 10
code/10-clean-urls/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/10-clean-urls/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 18
code/10-clean-urls/modules/Repos.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><NavLink to="/repos/rackt/react-router">React Router</NavLink></li>
-          <li><NavLink to="/repos/facebook/react">React</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 25
code/10-clean-urls/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base ."
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/10-clean-urls/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: ''
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 4
code/11-productionish-server/index.css

@@ -1,4 +0,0 @@
-.active {
-  color: green;
-}
-

+ 0 - 8
code/11-productionish-server/index.html

@@ -1,8 +0,0 @@
-<!doctype html public="storage">
-<html>
-<meta charset=utf-8/>
-<title>My First React Router App</title>
-<link rel=stylesheet href=/index.css>
-<div id=app></div>
-<script src="/bundle.js"></script>
-

+ 0 - 21
code/11-productionish-server/index.js

@@ -1,21 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, browserHistory, IndexRoute } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-import Home from './modules/Home'
-
-render((
-  <Router history={browserHistory}>
-    <Route path="/" component={App}>
-      <IndexRoute component={Home}/>
-      <Route path="/repos" component={Repos}>
-        <Route path="/repos/:userName/:repoName" component={Repo}/>
-      </Route>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/11-productionish-server/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 19
code/11-productionish-server/modules/App.js

@@ -1,19 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/" onlyActiveOnIndex>Home</NavLink></li>
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/11-productionish-server/modules/Home.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Home</div>
-  }
-})
-

+ 0 - 10
code/11-productionish-server/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/11-productionish-server/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 18
code/11-productionish-server/modules/Repos.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><NavLink to="/repos/rackt/react-router">React Router</NavLink></li>
-          <li><NavLink to="/repos/facebook/react">React</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 25
code/11-productionish-server/package.json

@@ -1,25 +0,0 @@
-{
-  "name": "tutorial",
-  "version": "1.0.0",
-  "description": "",
-  "main": "index.js",
-  "scripts": {
-    "start": "webpack-dev-server --inline --content-base . --history-api-fallback"
-  },
-  "author": "",
-  "license": "ISC",
-  "dependencies": {
-    "react": "^0.14.7",
-    "react-dom": "^0.14.7",
-    "react-router": "^2.0.0"
-  },
-  "devDependencies": {
-    "babel-core": "^6.5.1",
-    "babel-loader": "^6.2.2",
-    "babel-preset-es2015": "^6.5.0",
-    "babel-preset-react": "^6.5.0",
-    "http-server": "^0.8.5",
-    "webpack": "^1.12.13",
-    "webpack-dev-server": "^1.14.1"
-  }
-}

+ 0 - 15
code/11-productionish-server/webpack.config.js

@@ -1,15 +0,0 @@
-module.exports = {
-  entry: './index.js',
-
-  output: {
-    filename: 'bundle.js',
-    publicPath: '/'
-  },
-
-  module: {
-    loaders: [
-      { test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader?presets[]=es2015&presets[]=react' }
-    ]
-  }
-}
-

+ 0 - 21
code/12-navigating/index.js

@@ -1,21 +0,0 @@
-import React from 'react'
-import { render } from 'react-dom'
-import { Router, Route, browserHistory, IndexRoute } from 'react-router'
-import App from './modules/App'
-import About from './modules/About'
-import Repos from './modules/Repos'
-import Repo from './modules/Repo'
-import Home from './modules/Home'
-
-render((
-  <Router history={browserHistory}>
-    <Route path="/" component={App}>
-      <IndexRoute component={Home}/>
-      <Route path="/repos" component={Repos}>
-        <Route path="/repos/:userName/:repoName" component={Repo}/>
-      </Route>
-      <Route path="/about" component={About}/>
-    </Route>
-  </Router>
-), document.getElementById('app'))
-

+ 0 - 8
code/12-navigating/modules/About.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>About</div>
-  }
-})
-

+ 0 - 19
code/12-navigating/modules/App.js

@@ -1,19 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h1>React Router Tutorial</h1>
-        <ul role="nav">
-          <li><NavLink to="/" onlyActiveOnIndex>Home</NavLink></li>
-          <li><NavLink to="/about">About</NavLink></li>
-          <li><NavLink to="/repos">Repos</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

+ 0 - 8
code/12-navigating/modules/Home.js

@@ -1,8 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return <div>Home</div>
-  }
-})
-

+ 0 - 10
code/12-navigating/modules/NavLink.js

@@ -1,10 +0,0 @@
-// modules/NavLink.js
-import React from 'react'
-import { Link } from 'react-router'
-
-export default React.createClass({
-  render() {
-    return <Link {...this.props} activeClassName="active"/>
-  }
-})
-

+ 0 - 12
code/12-navigating/modules/Repo.js

@@ -1,12 +0,0 @@
-import React from 'react'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>{this.props.params.repoName}</h2>
-      </div>
-    )
-  }
-})
-

+ 0 - 18
code/12-navigating/modules/Repos.js

@@ -1,18 +0,0 @@
-import React from 'react'
-import NavLink from './NavLink'
-
-export default React.createClass({
-  render() {
-    return (
-      <div>
-        <h2>Repos</h2>
-        <ul>
-          <li><NavLink to="/repos/rackt/react-router">React Router</NavLink></li>
-          <li><NavLink to="/repos/facebook/react">React</NavLink></li>
-        </ul>
-        {this.props.children}
-      </div>
-    )
-  }
-})
-

部分文件因为文件数量过多而无法显示