Skip to content

Commit 1271796

Browse files
committed
redux apps added
1 parent 22decdf commit 1271796

File tree

112 files changed

+2539
-11
lines changed

Some content is hidden

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

112 files changed

+2539
-11
lines changed

Section-07 React ES6 Flux Apps/GitHub NoteTaker App Flux/gulpfile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var DEST = 'dist/js';
1111

1212
gulp.task('build', function(){
1313
gulp.src(SRC)
14-
1514
.pipe(browserify({transform: 'reactify'})) // bundeling & transforming
1615
.pipe(concat(OUT))
1716
.pipe(gulp.dest(DEST));

Section-07 React ES6 Flux Apps/GitHub NoteTaker App Flux/src/js/actions/GithubActions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var GithubUtils = require('../utils/GithubUtils');
44

55
var GithubActions = {
66
getUserBio: function(username){
7-
GithubUtils.getBio(username)
7+
GithubUtils.getBio(username) // promise obj
88
.then(function(response){
99
AppDispatcher.handleAction({
1010
actionType: AppConstants.GITHUB_USER_BIO,

Section-07 React ES6 Flux Apps/GitHub NoteTaker App Flux/src/js/components/SearchGithub.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var SearchGithub = React.createClass({
1313
var username = this.state.username;
1414
this.setState({username: ''});
1515
this.transitionTo('profile', {username: username});
16+
// ptofile
1617
},
1718
render: function(){
1819
return (

Section-07 React ES6 Flux Apps/GitHub NoteTaker App Flux/src/js/utils/GithubUtils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var AppConstants = require('../constants/AppConstants');
22
var axios = require('axios');
3-
3+
// axios => firing call nad returning promise
44
var GithubUtils = {
55
getBio: function(username){
66
var url = "https://api.github.com/users/" + username;
@@ -12,4 +12,5 @@ var GithubUtils = {
1212
}
1313
};
1414

15+
// p = call() p.then(function(){} , function(){})
1516
module.exports = GithubUtils;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": [ "es2015", "stage-2", "react" ]
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
node_modules
3+
webpack.config.js
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{ "extends": "eslint-config-airbnb",
2+
"env": {
3+
"browser": true,
4+
"node": true,
5+
"mocha": true
6+
},
7+
"ecmaFeatures": {
8+
"experimentalObjectRestSpread": true
9+
},
10+
"rules": {
11+
"react/no-multi-comp": 0,
12+
"import/default": 0,
13+
"import/no-duplicates": 0,
14+
"import/named": 0,
15+
"import/namespace": 0,
16+
"import/no-unresolved": 0,
17+
"import/no-named-as-default": 0, //
18+
// Temporarirly disabled due to a possible bug in babel-eslint (todomvc example)
19+
"block-scoped-var": 0,
20+
// Temporarily disabled for test/* until babel/babel-eslint#33 is resolved
21+
"padded-blocks": 0,
22+
"comma-dangle": 0, // not sure why airbnb turned this on. gross!
23+
"indent": [2, 2, {"SwitchCase": 1}],
24+
"no-console": 0,
25+
"no-alert": 0
26+
},
27+
"plugins": [
28+
"react", "import"
29+
],
30+
"settings": {
31+
"import/parser": "babel-eslint",
32+
"import/resolve": {
33+
moduleDirectory: ["node_modules", "src"]
34+
}
35+
},
36+
"globals": {
37+
"__DEVELOPMENT__": true,
38+
"__CLIENT__": true,
39+
"__SERVER__": true,
40+
"__DISABLE_SSR__": true,
41+
"__DEVTOOLS__": true,
42+
"socket": true,
43+
"webpackIsomorphicTools": true
44+
}
45+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/node_modules/
2+
*/node_modules/
3+
/bower_components/
4+
*/bower_components/
5+
.settings
6+
.project
7+
.project
8+
.metadata
9+
.classpath
10+
.settings/
11+
logfile.txt
12+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This repository contains the todo app code written by Dan Abramov in
2+
https://egghead.io/series/getting-started-with-redux.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>JS Bin</title>
6+
<link rel="stylesheet" href="build/app.css">
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script src="build/bundle.js"></script>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)