Skip to content

Commit 54be6fa

Browse files
committed
quick recap added
1 parent 855a452 commit 54be6fa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1653
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
bundle.js
3+
bundle.map
4+
npm-debug.log
5+
*~
6+
node_modules
7+
browser-bundle.js
8+
browser-bundle.js.map
9+
node_modules
10+
bundle.js
11+
bundle.map
12+
npm-debug.log
13+
/node_modules/*
14+
*/node_modules/*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('hello world');
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>React Presentation</title>
6+
</head>
7+
<body>
8+
9+
<div id="root"></div>
10+
11+
<script src="bundle.js"></script>
12+
13+
</body>
14+
</html>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "react-presentation",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "webpack.config.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"babel-core": "^6.3.13",
13+
"babel-loader": "^6.2.0"
14+
}
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
entry: "./app/app.js",
3+
output: {
4+
filename: "./bundle.js",
5+
sourceMapFilename: "./bundle.map"
6+
},
7+
devtool: '#source-map'
8+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react'; // Presenter Note: Required even if we're not using the `React` object
2+
import ReactDOM from 'react-dom';
3+
import FirstComponent from './first-component';
4+
5+
ReactDOM.render((
6+
<FirstComponent />
7+
), document.getElementById('root'));
8+
9+
10+
11+
12+
/*
13+
14+
"Similar" jQuery
15+
16+
var FirstComponent = $('<div>Hello World</div>');
17+
$('#root').html(FirstComponent);
18+
19+
*/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
3+
const FirstComponent = React.createClass({
4+
render: function() {
5+
return (
6+
<div>Hello World</div>
7+
)
8+
}
9+
});
10+
11+
export default FirstComponent;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>React Presentation</title>
6+
</head>
7+
<body>
8+
9+
<div id="root"></div>
10+
11+
<script src="bundle.js"></script>
12+
13+
</body>
14+
</html>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "react-presentation",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "webpack.config.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"react": "^0.14.3",
13+
"react-dom": "^0.14.3"
14+
},
15+
"devDependencies": {
16+
"babel-core": "^6.3.13",
17+
"babel-loader": "^6.2.0",
18+
"babel-preset-es2015": "^6.3.13",
19+
"babel-preset-react": "^6.3.13",
20+
"babel-preset-stage-2": "^6.3.13"
21+
}
22+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = {
2+
entry: "./app/app.js",
3+
output: {
4+
filename: "./bundle.js",
5+
sourceMapFilename: "./bundle.map"
6+
},
7+
devtool: '#source-map',
8+
module: {
9+
loaders: [
10+
{
11+
loader: 'babel',
12+
test: /\.jsx?$/,
13+
exclude: /(node_modules|bower_components)/,
14+
query: {
15+
presets: ['react', 'es2015', 'stage-2']
16+
}
17+
}
18+
]
19+
}
20+
}

0 commit comments

Comments
 (0)