├── .gitignore
├── 001 - Combining Redux and Firebase
├── .babelrc
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ ├── index.js
│ │ └── types.js
│ ├── components
│ │ ├── app.js
│ │ └── post_item.js
│ ├── index.js
│ └── reducers
│ │ ├── index.js
│ │ └── posts_reducer.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 002 - Basics of Redux Thunk
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ └── app.js
│ ├── index.js
│ └── reducers
│ │ └── index.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 003 - Dynamic Forms with Redux Form
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ ├── app.js
│ │ ├── posts_index.js
│ │ ├── posts_new.bak.js
│ │ ├── posts_new.js
│ │ └── posts_show.js
│ ├── index.js
│ ├── reducers
│ │ ├── index.js
│ │ └── reducer_posts.js
│ └── routes.js
├── style
│ └── style.css
└── webpack.config.js
├── 004 - Logicless Components with Reselect
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ ├── index.js
│ │ └── types.js
│ ├── components
│ │ ├── app.js
│ │ ├── posts_list.js
│ │ └── selected_posts_list.js
│ ├── index.js
│ ├── reducers
│ │ ├── index.js
│ │ ├── reducer_posts.js
│ │ └── reducer_selected_posts.js
│ └── selectors
│ │ └── selected_posts.js
├── style
│ └── style.css
└── webpack.config.js
├── 005 - A Better Way to Load Data
├── .babelrc
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ ├── index.js
│ │ └── types.js
│ ├── components
│ │ ├── app.js
│ │ └── photos.js
│ ├── index.js
│ ├── reducers
│ │ ├── index.js
│ │ └── photos_reducer.js
│ ├── routes
│ │ ├── index.js
│ │ └── route_callbacks.js
│ └── store.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 006 - Animation of React Components
├── .babelrc
├── README.md
├── index.html
├── npm-debug.log
├── package.json
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ └── app.js
│ ├── index.js
│ └── reducers
│ │ └── index.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 008 - Building Modals with React
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ ├── app.js
│ │ ├── bad_modal.js
│ │ ├── colors.js
│ │ └── modal.js
│ ├── index.js
│ └── reducers
│ │ └── index.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 011
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── server.js
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ ├── app.js
│ │ └── child.js
│ ├── index.js
│ └── reducers
│ │ └── index.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 013 - Deployment of Webpack Apps
├── .babelrc
├── .gitignore
├── index.html
├── package.json
├── server.js
├── src
│ ├── components
│ │ ├── search_bar.js
│ │ ├── video_detail.js
│ │ ├── video_item.js
│ │ └── video_list.js
│ └── index.js
├── style
│ └── style.css
└── webpack.config.js
├── 016
├── .babelrc
├── .gitignore
├── README.md
├── index.html
├── package.json
├── src
│ ├── actions
│ │ └── index.js
│ ├── components
│ │ ├── app.js
│ │ └── google_map.js
│ ├── index.js
│ └── reducers
│ │ └── index.js
├── style
│ └── style.css
├── test
│ ├── components
│ │ └── app_test.js
│ └── test_helper.js
└── webpack.config.js
├── 017 - React Native Testing
├── rn_cli_example
│ ├── .babelrc
│ ├── .buckconfig
│ ├── .flowconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .watchmanconfig
│ ├── __tests__
│ │ ├── index.android.js
│ │ └── index.ios.js
│ ├── android
│ │ ├── app
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── rn_cli_example
│ │ │ │ │ ├── MainActivity.java
│ │ │ │ │ └── MainApplication.java
│ │ │ │ └── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ ├── strings.xml
│ │ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── keystores
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── app.json
│ ├── index.android.js
│ ├── index.ios.js
│ ├── ios
│ │ ├── rn_cli_example-tvOS
│ │ │ └── Info.plist
│ │ ├── rn_cli_example-tvOSTests
│ │ │ └── Info.plist
│ │ ├── rn_cli_example.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ ├── rn_cli_example-tvOS.xcscheme
│ │ │ │ └── rn_cli_example.xcscheme
│ │ ├── rn_cli_example
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ └── rn_cli_exampleTests
│ │ │ ├── Info.plist
│ │ │ └── rn_cli_exampleTests.m
│ ├── package.json
│ └── yarn.lock
└── testing
│ ├── .babelrc
│ ├── .flowconfig
│ ├── .gitignore
│ ├── .watchmanconfig
│ ├── App.js
│ ├── App.test.js
│ ├── README.md
│ ├── __snapshots__
│ └── App.test.js.snap
│ ├── app.json
│ ├── package.json
│ └── yarn.lock
├── 018 - RN vs Flutter
├── .gitkeep
└── diagrams.xml
├── 019 - Animations
├── .gitkeep
├── dev
│ ├── .gitignore
│ ├── .idea
│ │ ├── libraries
│ │ │ ├── Dart_SDK.xml
│ │ │ └── Flutter_for_Android.xml
│ │ ├── modules.xml
│ │ ├── runConfigurations
│ │ │ └── main_dart.xml
│ │ └── workspace.xml
│ ├── .metadata
│ ├── README.md
│ ├── android
│ │ ├── .gitignore
│ │ ├── app
│ │ │ ├── build.gradle
│ │ │ └── src
│ │ │ │ └── main
│ │ │ │ ├── AndroidManifest.xml
│ │ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── scoped
│ │ │ │ │ └── MainActivity.java
│ │ │ │ └── res
│ │ │ │ ├── drawable
│ │ │ │ └── launch_background.xml
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ └── ic_launcher.png
│ │ │ │ └── values
│ │ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ └── settings.gradle
│ ├── ios
│ │ ├── .gitignore
│ │ ├── Flutter
│ │ │ ├── AppFrameworkInfo.plist
│ │ │ ├── Debug.xcconfig
│ │ │ └── Release.xcconfig
│ │ ├── Runner.xcodeproj
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace
│ │ │ │ └── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── xcschemes
│ │ │ │ └── Runner.xcscheme
│ │ ├── Runner.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── Runner
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Assets.xcassets
│ │ │ ├── AppIcon.appiconset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ │ └── LaunchImage.imageset
│ │ │ │ ├── Contents.json
│ │ │ │ ├── LaunchImage.png
│ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ └── README.md
│ │ │ ├── Base.lproj
│ │ │ ├── LaunchScreen.storyboard
│ │ │ └── Main.storyboard
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ ├── lib
│ │ └── main.dart
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ ├── scoped.iml
│ ├── scoped_android.iml
│ └── test
│ │ └── widget_test.dart
├── diagrams.xml
└── prod
│ ├── .gitignore
│ ├── .idea
│ ├── libraries
│ │ ├── Dart_SDK.xml
│ │ └── Flutter_for_Android.xml
│ ├── modules.xml
│ ├── runConfigurations
│ │ └── main_dart.xml
│ └── workspace.xml
│ ├── .metadata
│ ├── README.md
│ ├── android
│ ├── .gitignore
│ ├── app
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── prod
│ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ ├── gradlew
│ ├── gradlew.bat
│ └── settings.gradle
│ ├── ios
│ ├── .gitignore
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ └── Release.xcconfig
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
│ ├── lib
│ └── main.dart
│ ├── prod.iml
│ ├── prod_android.iml
│ ├── pubspec.lock
│ ├── pubspec.yaml
│ └── test
│ └── widget_test.dart
├── 20 - redux
├── .gitkeep
├── code.js
└── diagrams.xml
├── LICENSE.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .DS_Store
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install depdencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "babel-preset-stage-1": "^6.1.18",
30 | "firebase": "^2.4.2",
31 | "lodash": "^3.10.1",
32 | "react": "^0.14.3",
33 | "react-dom": "^0.14.3",
34 | "react-redux": "^4.0.0",
35 | "react-router": "^2.0.1",
36 | "redux": "^3.0.4",
37 | "redux-thunk": "^2.0.1"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import Firebase from 'firebase';
2 | import _ from 'lodash';
3 | import {
4 | FETCH_POSTS,
5 | DELETE_POST,
6 | CREATE_POST
7 | } from './types';
8 |
9 | const Posts = new Firebase('https://fbredux.firebaseio.com/');
10 |
11 | export function fetchPosts() {
12 | return dispatch => {
13 | Posts.on('value', snapshot => {
14 | dispatch({
15 | type: FETCH_POSTS,
16 | payload: snapshot.val()
17 | });
18 | });
19 | };
20 | }
21 |
22 | export function createPost(post) {
23 | return dispatch => Posts.push(post);
24 | }
25 |
26 | export function deletePost(key) {
27 | return dispatch => Posts.child(key).remove();
28 | }
29 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/actions/types.js:
--------------------------------------------------------------------------------
1 | export const FETCH_POSTS = 'FETCH_POSTS';
2 | export const UPDATE_POST = 'UPDATE_POST';
3 | export const DELETE_POST = 'DELETE_POST';
4 | export const CREATE_POST = 'CREATE_POST';
5 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/components/app.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import React, { Component } from 'react';
3 | import { connect } from 'react-redux';
4 | import * as actions from '../actions';
5 | import PostItem from './post_item';
6 |
7 | class App extends Component {
8 | state = { post: '' };
9 |
10 | componentWillMount() {
11 | this.props.fetchPosts();
12 | }
13 |
14 | handleInputChange(event) {
15 | this.setState({ post: event.target.value });
16 | }
17 |
18 | handleFormSubmit(event) {
19 | event.preventDefault();
20 |
21 | this.props.createPost(this.state.post)
22 | }
23 |
24 | renderPosts() {
25 | return _.map(this.props.posts, (post, key) => {
26 | return
27 | });
28 | }
29 |
30 | render() {
31 | return (
32 |
33 |
Create a Post
34 |
44 |
45 | {this.renderPosts()}
46 |
47 |
48 | );
49 | }
50 | }
51 |
52 | function mapStateToProps(state) {
53 | return { posts: state.posts };
54 | }
55 |
56 | export default connect(mapStateToProps, actions)(App)
57 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/components/post_item.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'react-redux';
3 | import * as actions from '../actions';
4 |
5 | class PostItem extends Component {
6 | handleClick() {
7 | this.props.deletePost(this.props.id);
8 | }
9 |
10 | render() {
11 | return (
12 |
13 | {this.props.post}
14 |
19 |
20 | );
21 | }
22 | }
23 |
24 | export default connect(null, actions)(PostItem);
25 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 | import reduxThunk from 'redux-thunk';
6 |
7 | import App from './components/app';
8 | import reducers from './reducers';
9 |
10 | const createStoreWithMiddleware = applyMiddleware(reduxThunk)(createStore);
11 |
12 | ReactDOM.render(
13 |
14 |
15 |
16 | , document.querySelector('.container'));
17 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import postsReducer from './posts_reducer';
3 |
4 | const rootReducer = combineReducers({
5 | posts: postsReducer
6 | });
7 |
8 | export default rootReducer;
9 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/src/reducers/posts_reducer.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import {
3 | FETCH_POSTS,
4 | CREATE_POST,
5 | DELETE_POST
6 | } from '../actions/types';
7 |
8 | export default function(state = {}, action) {
9 | switch (action.type) {
10 | case FETCH_POSTS:
11 | return action.payload;
12 | case CREATE_POST:
13 | return { ...state, ...action.payload };
14 | case DELETE_POST:
15 | return _.omit(state, action.payload);
16 | }
17 |
18 | return state;
19 | }
20 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/style/style.css:
--------------------------------------------------------------------------------
1 | li.list-group-item {
2 | display: flex;
3 | justify-content: space-between;
4 | align-items: center;
5 | }
6 |
7 | form {
8 | margin: 10px 0px;
9 | }
10 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | const $ = _$(window);
15 |
16 | chaiJquery(chai, chai.util, $);
17 |
18 | function renderComponent(ComponentClass, props = {}, state = {}) {
19 | const componentInstance = TestUtils.renderIntoDocument(
20 |
21 |
22 |
23 | );
24 |
25 | return $(ReactDOM.findDOMNode(componentInstance));
26 | }
27 |
28 | $.fn.simulate = function(eventName, value) {
29 | if (value) {
30 | this.val(value);
31 | }
32 | TestUtils.Simulate[eventName](this[0]);
33 | };
34 |
35 | export {renderComponent, expect};
36 |
--------------------------------------------------------------------------------
/001 - Combining Redux and Firebase/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | historyApiFallback: true,
21 | contentBase: './'
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install depdencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "axios": "^0.9.1",
30 | "babel-preset-stage-1": "^6.1.18",
31 | "lodash": "^3.10.1",
32 | "react": "^0.14.3",
33 | "react-dom": "^0.14.3",
34 | "react-redux": "^4.0.0",
35 | "react-router": "^2.0.1",
36 | "redux": "^3.0.4",
37 | "redux-thunk": "^2.0.1"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | export function fetchUsers() {
4 | const request = axios.get('http://jsonplaceholder.typicode.com/users');
5 |
6 | return (dispatch) => {
7 | request.then(({data}) => {
8 | dispatch({ type: 'FETCH_PROFILES', payload: data })
9 | });
10 | };
11 | }
12 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'react-redux';
3 | import * as actions from '../actions';
4 |
5 | export default class App extends Component {
6 | componentWillMount() {
7 | this.props.fetchUsers();
8 | }
9 |
10 | renderUser({id, name, email}) {
11 | return (
12 |
13 |
14 | {email}
15 |
16 | {name}
17 |
18 | );
19 | }
20 |
21 | render() {
22 | return (
23 |
24 |
Email Directory
25 |
26 | {this.props.users.map(this.renderUser)}
27 |
28 |
29 | );
30 | }
31 | }
32 |
33 | export default connect((state => state), actions)(App);
34 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 | import reduxThunk from 'redux-thunk';
6 |
7 | import App from './components/app';
8 | import reducers from './reducers';
9 |
10 | const createStoreWithMiddleware = applyMiddleware(reduxThunk)(createStore);
11 |
12 | ReactDOM.render(
13 |
14 |
15 |
16 | , document.querySelector('.container'));
17 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | const rootReducer = combineReducers({
4 | users: (state = [], action) => action.payload || state
5 | });
6 |
7 | export default rootReducer;
8 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/style/style.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/002 - Basics of Redux Thunk/style/style.css
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | const $ = _$(window);
15 |
16 | chaiJquery(chai, chai.util, $);
17 |
18 | function renderComponent(ComponentClass, props = {}, state = {}) {
19 | const componentInstance = TestUtils.renderIntoDocument(
20 |
21 |
22 |
23 | );
24 |
25 | return $(ReactDOM.findDOMNode(componentInstance));
26 | }
27 |
28 | $.fn.simulate = function(eventName, value) {
29 | if (value) {
30 | this.val(value);
31 | }
32 | TestUtils.Simulate[eventName](this[0]);
33 | };
34 |
35 | export {renderComponent, expect};
36 |
--------------------------------------------------------------------------------
/002 - Basics of Redux Thunk/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | historyApiFallback: true,
21 | contentBase: './'
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | ###Getting Started###
4 |
5 | There are two methods for getting started with this repo.
6 |
7 | ####Familiar with Git?#####
8 | Checkout this repo, install depdencies, then start the gulp process with the following:
9 |
10 | ```
11 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
12 | > cd ReduxSimpleStarter
13 | > npm install
14 | > npm start
15 | ```
16 |
17 | ####Not Familiar with Git?#####
18 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
19 |
20 | ```
21 | > npm install
22 | > npm start
23 | ```
24 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --history-api-fallback"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "babel-core": "^6.2.1",
14 | "babel-loader": "^6.2.0",
15 | "babel-preset-es2015": "^6.1.18",
16 | "babel-preset-react": "^6.1.18",
17 | "webpack": "^1.12.9",
18 | "webpack-dev-server": "^1.14.0"
19 | },
20 | "dependencies": {
21 | "axios": "^0.8.1",
22 | "babel-preset-stage-1": "^6.1.18",
23 | "lodash": "^3.10.1",
24 | "react": "^0.14.3",
25 | "react-dom": "^0.14.3",
26 | "react-redux": "^4.0.0",
27 | "react-router": "^2.0.0-rc5",
28 | "redux": "^3.0.4",
29 | "redux-form": "^4.1.3",
30 | "redux-promise": "^0.5.0",
31 | "redux-simple-router": "^2.0.3"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 |
3 | export const FETCH_POST = 'FETCH_POST';
4 | export const FETCH_POSTS = 'FETCH_POSTS';
5 | export const CREATE_POST = 'CREATE_POST';
6 | export const DELETE_POST = 'DELETE_POST';
7 |
8 | const ROOT_URL = 'http://reduxblog.herokuapp.com/api';
9 | const KEY = `?key=ab42`;
10 |
11 | export function fetchPost(id) {
12 | const request = axios.get(`${ROOT_URL}/posts/${id}${KEY}`);
13 |
14 | return {
15 | type: FETCH_POST,
16 | payload: request
17 | };
18 | }
19 |
20 | export function fetchPosts() {
21 | const request = axios.get(`${ROOT_URL}/posts${KEY}`);
22 |
23 | return {
24 | type: FETCH_POSTS,
25 | payload: request
26 | };
27 | }
28 |
29 | export function createPost(props) {
30 | const request = axios.post(`${ROOT_URL}/posts${KEY}`, props);
31 |
32 | return {
33 | type: CREATE_POST,
34 | payload: request
35 | };
36 | }
37 |
38 | export function deletePost(id) {
39 | const request = axios.delete(`${ROOT_URL}/posts/${id}${KEY}`,);
40 |
41 | return {
42 | type: DELETE_POST,
43 | payload: request
44 | };
45 | }
46 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Component } from 'react';
3 |
4 | export default class App extends Component {
5 | render() {
6 | return (
7 |
8 | {this.props.children}
9 |
10 | );
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/components/posts_index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'react-redux';
3 | import { fetchPosts } from '../actions/index';
4 | import { Link } from 'react-router';
5 |
6 | class PostIndex extends Component {
7 | componentWillMount() {
8 | this.props.fetchPosts();
9 | }
10 |
11 | renderPosts() {
12 | return this.props.posts.map((post) => {
13 | return (
14 |
15 |
16 | {post.categories}
17 | {post.title}
18 |
19 |
20 | )
21 | });
22 | }
23 |
24 | render() {
25 | return (
26 |
27 |
28 |
29 | Add a Post
30 |
31 |
32 |
Posts
33 |
34 | {this.renderPosts()}
35 |
36 |
37 | );
38 | }
39 | }
40 |
41 | function mapStateToProps(state) {
42 | return { posts: state.posts.all };
43 | }
44 |
45 | export default connect(mapStateToProps, { fetchPosts })(PostIndex);
46 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/components/posts_new.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import React, { Component, PropTypes } from 'react';
3 | import { reduxForm } from 'redux-form';
4 | import { Link } from 'react-router';
5 |
6 | const FIELDS = {
7 | title: {
8 | type: 'input',
9 | label: 'Title for Post'
10 | },
11 | categories: {
12 | type: 'input',
13 | label: 'Enter some categories for this post'
14 | },
15 | content: {
16 | type: 'textarea',
17 | label: 'Post Contents'
18 | }
19 | };
20 |
21 | class PostsNew extends Component {
22 | onSubmit(props) {
23 | alert('Post Submitted');
24 | }
25 |
26 | renderField(fieldConfig, field) {
27 | const fieldHelper = this.props.fields[field];
28 |
29 | return (
30 |
31 |
32 |
33 |
34 | {fieldHelper.touched ? fieldHelper.error : ''}
35 |
36 |
37 | );
38 | }
39 |
40 | render() {
41 | const { handleSubmit } = this.props;
42 |
43 | return (
44 |
50 | );
51 | }
52 | }
53 |
54 | function validate(values) {
55 | const errors = {};
56 |
57 | _.each(FIELDS, (type, field) => {
58 | if (!values[field]) {
59 | errors[field] = `Enter a ${field}`;
60 | }
61 | });
62 |
63 | return errors;
64 | }
65 |
66 | export default reduxForm({
67 | form: 'PostsNew',
68 | fields: _.keys(FIELDS),
69 | validate
70 | })(PostsNew);
71 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/components/posts_show.js:
--------------------------------------------------------------------------------
1 | import React, { Component, PropTypes } from 'react';
2 | import { connect } from 'react-redux';
3 | import { fetchPost, deletePost } from '../actions/index';
4 | import { Link } from 'react-router';
5 |
6 | class PostsShow extends Component {
7 | static contextTypes = {
8 | router: PropTypes.object
9 | };
10 |
11 | componentWillMount() {
12 | this.props.fetchPost(this.props.params.id);
13 | }
14 |
15 | onDeleteClick() {
16 | this.props.deletePost(this.props.params.id)
17 | .then(() => { this.context.router.push('/') });
18 | }
19 |
20 | render() {
21 | const { post } = this.props;
22 |
23 | if (!post) {
24 | return Loading...
;
25 | }
26 |
27 | return (
28 |
29 |
Back To Index
30 |
35 |
{post.title}
36 |
Categories: {post.categories}
37 |
{post.content}
38 |
39 | );
40 | }
41 | }
42 |
43 | function mapStateToProps(state) {
44 | return { post: state.posts.post };
45 | }
46 |
47 | export default connect(mapStateToProps, { fetchPost, deletePost })(PostsShow);
48 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 | import { Router, browserHistory } from 'react-router';
6 | import promise from 'redux-promise';
7 | import reducers from './reducers';
8 | import routes from './routes';
9 |
10 | const createStoreWithMiddleware = applyMiddleware(
11 | promise
12 | )(createStore);
13 |
14 | ReactDOM.render(
15 |
16 |
17 |
18 | , document.querySelector('.container'));
19 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import {reducer as formReducer} from 'redux-form';
3 | import PostsReducer from './reducer_posts';
4 |
5 | const rootReducer = combineReducers({
6 | posts: PostsReducer,
7 | form: formReducer
8 | });
9 |
10 | export default rootReducer;
11 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/reducers/reducer_posts.js:
--------------------------------------------------------------------------------
1 | import { FETCH_POSTS, FETCH_POST } from '../actions/index';
2 |
3 | const INITIAL_STATE = { all: [], post: null };
4 |
5 | export default function(state = INITIAL_STATE, action) {
6 | switch(action.type) {
7 | case FETCH_POST:
8 | return { ...state, post: action.payload.data };
9 | case FETCH_POSTS:
10 | return { ...state, all: action.payload.data };
11 | default:
12 | return state;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/src/routes.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Route, IndexRoute } from 'react-router';
3 | import App from './components/app';
4 | import PostsIndex from './components/posts_index';
5 | import PostsNew from './components/posts_new.js';
6 | import PostsShow from './components/posts_show.js';
7 |
8 | export default (
9 |
10 |
11 |
12 |
13 |
14 | );
15 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/style/style.css:
--------------------------------------------------------------------------------
1 | form a {
2 | margin-left: 5px;
3 | }
4 |
--------------------------------------------------------------------------------
/003 - Dynamic Forms with Redux Form/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | historyApiFallback: true,
21 | contentBase: './'
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | ###Getting Started###
4 |
5 | There are two methods for getting started with this repo.
6 |
7 | ####Familiar with Git?#####
8 | Checkout this repo, install depdencies, then start the gulp process with the following:
9 |
10 | ```
11 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
12 | > cd ReduxSimpleStarter
13 | > npm install
14 | > npm start
15 | ```
16 |
17 | ####Not Familiar with Git?#####
18 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
19 |
20 | ```
21 | > npm install
22 | > npm start
23 | ```
24 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js"
9 | },
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "babel-core": "^6.2.1",
14 | "babel-loader": "^6.2.0",
15 | "babel-preset-es2015": "^6.1.18",
16 | "babel-preset-react": "^6.1.18",
17 | "webpack": "^1.12.9",
18 | "webpack-dev-server": "^1.14.0"
19 | },
20 | "dependencies": {
21 | "axios": "^0.9.1",
22 | "babel-preset-stage-1": "^6.1.18",
23 | "lodash": "^3.10.1",
24 | "react": "^0.14.3",
25 | "react-dom": "^0.14.3",
26 | "react-redux": "^4.0.0",
27 | "redux": "^3.0.4",
28 | "redux-form": "^4.2.0",
29 | "redux-promise": "^0.5.1",
30 | "reselect": "^2.0.3"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios';
2 | import {
3 | FETCH_POSTS,
4 | SELECT_POST,
5 | DESELECT_POST
6 | } from './types'
7 |
8 | export function fetchPosts() {
9 | const request = axios.get('http://jsonplaceholder.typicode.com/posts');
10 |
11 | return {
12 | type: FETCH_POSTS,
13 | payload: request
14 | };
15 | }
16 |
17 | export function selectPost(id) {
18 | return {
19 | type: SELECT_POST,
20 | payload: id
21 | };
22 | }
23 |
24 | export function deselectPost(id) {
25 | return {
26 | type: DESELECT_POST,
27 | payload: id
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/actions/types.js:
--------------------------------------------------------------------------------
1 | export const FETCH_POSTS = 'fetch_posts';
2 | export const SELECT_POST = 'select_post';
3 | export const DESELECT_POST = 'deslect_post';
4 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Component } from 'react';
3 |
4 | import Posts from 'components/posts_list';
5 | import SelectedPostsList from 'components/selected_posts_list';
6 |
7 | export default () => {
8 | return (
9 |
10 |
Selected Posts
11 |
12 |
13 |
All Posts
14 |
15 |
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/components/posts_list.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import React, { Component } from 'react';
3 | import { connect } from 'react-redux';
4 | import * as actions from 'actions';
5 |
6 | class PostsList extends Component {
7 | componentWillMount() {
8 | this.props.fetchPosts();
9 | }
10 |
11 | handlePostSelect({ id }, event) {
12 | const { selectPost, deselectPost } = this.props;
13 |
14 | event.target.checked ? selectPost(id) : deselectPost(id);
15 | }
16 |
17 | renderPost(post) {
18 | console.log(_.contains(this.props.selectedPostIds, post.id))
19 | return (
20 |
21 |
25 | {post.title}
26 |
27 | );
28 | }
29 |
30 | render() {
31 | return (
32 |
33 | {_.map(this.props.posts, this.renderPost.bind(this))}
34 |
35 | );
36 | }
37 | }
38 |
39 | export default connect(({posts, selectedPostIds}) => ({posts, selectedPostIds}) , actions)(PostsList)
40 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/components/selected_posts_list.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'react-redux';
3 | import SelectedPostsSelector from 'selectors/selected_posts';
4 |
5 | const SelectedPostsList = (props) => {
6 | return (
7 |
8 | {
9 | props.posts.map(post => {
10 | return - {post.title}
11 | })
12 | }
13 |
14 | );
15 | };
16 |
17 | const mapStateToProps = state => {
18 | return {
19 | posts: SelectedPostsSelector(state)
20 | };
21 | };
22 |
23 | export default connect(mapStateToProps)(SelectedPostsList);
24 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware, compose } from 'redux';
5 | import ReduxPromise from 'redux-promise';
6 |
7 | import reducers from 'reducers';
8 | import App from 'components/app';
9 |
10 | const createStoreWithMiddleware = compose(
11 | applyMiddleware(ReduxPromise),
12 | window.devToolsExtension ? window.devToolsExtension() : f => f
13 | )(createStore);
14 |
15 | ReactDOM.render(
16 |
17 |
18 |
19 | , document.querySelector('.container'));
20 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import posts from 'reducers/reducer_posts';
3 | import selectedPostIds from 'reducers/reducer_selected_posts';
4 |
5 | const rootReducer = combineReducers({
6 | posts,
7 | selectedPostIds
8 | });
9 |
10 | export default rootReducer;
11 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/reducers/reducer_posts.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import { FETCH_POSTS } from 'actions/types';
3 |
4 | export default function(state = {}, action) {
5 | switch(action.type) {
6 | case FETCH_POSTS:
7 | return _.mapKeys(action.payload.data, 'id');
8 | }
9 |
10 | return state;
11 | }
12 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/reducers/reducer_selected_posts.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import {
3 | SELECT_POST,
4 | DESELECT_POST
5 | } from 'actions/types';
6 |
7 | export default function(state = {}, action) {
8 | switch(action.type) {
9 | case SELECT_POST:
10 | return [ ...state, action.payload ];
11 | case DESELECT_POST:
12 | return _.without(state, action.payload);
13 | }
14 |
15 | return state;
16 | }
17 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/src/selectors/selected_posts.js:
--------------------------------------------------------------------------------
1 | // Reselect selector
2 | // Takes a list of posts and post Ids, and picks out
3 | // the selected Posts
4 | import _ from 'lodash';
5 | import { createSelector } from 'reselect';
6 |
7 | // Create select functions to pick off the pieces of state we care about
8 | // for this calculation
9 | const postsSelector = state => state.posts
10 | const selectedPostsSelector = state => state.selectedPostIds
11 |
12 | const getPosts = (posts, selectedPostIds) => {
13 | const selectedPosts = _.filter(
14 | posts,
15 | post => _.contains(selectedPostIds, post.id)
16 | );
17 |
18 | return selectedPosts;
19 | };
20 |
21 | export default createSelector(
22 | postsSelector, // pick off a piece of state
23 | selectedPostsSelector, // pick off a piece of state
24 | getPosts // last argument is the function that has our select logic
25 | );
26 |
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/style/style.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/004 - Logicless Components with Reselect/style/style.css
--------------------------------------------------------------------------------
/004 - Logicless Components with Reselect/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | root: [ __dirname + '/src' ],
18 | extensions: ['', '.js', '.jsx']
19 | },
20 | devServer: {
21 | historyApiFallback: true,
22 | contentBase: './'
23 | }
24 | };
25 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install depdencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "axios": "^0.11.0",
30 | "babel-preset-stage-1": "^6.1.18",
31 | "lodash": "^3.10.1",
32 | "react": "^0.14.3",
33 | "react-dom": "^0.14.3",
34 | "react-redux": "^4.4.5",
35 | "react-router": "^2.4.0",
36 | "redux": "^3.0.4",
37 | "redux-promise": "^0.5.3"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/actions/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | import {
4 | FETCH_PHOTOS
5 | } from './types';
6 |
7 | export function fetchPhotos() {
8 | const request = axios.get('http://jsonplaceholder.typicode.com/photos?albumId=41');
9 |
10 | return {
11 | type: FETCH_PHOTOS,
12 | payload: request
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/actions/types.js:
--------------------------------------------------------------------------------
1 | export const FETCH_PHOTOS = 'fetch_photos';
2 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Component } from 'react';
3 |
4 | export default class App extends Component {
5 | render() {
6 | return (
7 | {this.props.children}
8 | );
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/components/photos.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'react-redux';
3 | import { Link } from 'react-router';
4 |
5 | class UserList extends Component {
6 | renderPhotos() {
7 | return this.props.photos.map(photo => {
8 | return (
9 |
10 |
11 |
12 |
13 |
14 | );
15 | });
16 | }
17 |
18 | render() {
19 | return (
20 |
21 | {this.renderPhotos()}
22 |
23 | );
24 | }
25 | }
26 |
27 | function mapStateToProps({ photos }) {
28 | return { photos }
29 | }
30 |
31 | export default connect(mapStateToProps)(UserList);
32 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/index.js:
--------------------------------------------------------------------------------
1 | import ReactDOM from 'react-dom';
2 | import Routes from './routes';
3 |
4 | ReactDOM.render(Routes, document.querySelector('.container'));
5 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 | import photos from './photos_reducer';
3 |
4 | const rootReducer = combineReducers({
5 | photos
6 | });
7 |
8 | export default rootReducer;
9 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/reducers/photos_reducer.js:
--------------------------------------------------------------------------------
1 | import { FETCH_PHOTOS } from '../actions/types';
2 |
3 | export default function(state = [], action) {
4 | switch (action.type) {
5 | case FETCH_PHOTOS:
6 | return action.payload.data;
7 | default:
8 | return state;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/routes/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { Provider } from 'react-redux';
3 | import { Router, Route, browserHistory } from 'react-router';
4 |
5 | import App from '../components/app';
6 | import Photos from '../components/photos';
7 | import store from '../store';
8 |
9 | import { onPhotosEnter } from './route_callbacks';
10 |
11 | export default (
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | );
20 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/routes/route_callbacks.js:
--------------------------------------------------------------------------------
1 | import store from '../store';
2 | import { fetchPhotos } from '../actions';
3 |
4 | export function onPhotosEnter() {
5 | store.dispatch(fetchPhotos());
6 | }
7 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/src/store.js:
--------------------------------------------------------------------------------
1 | import { createStore, applyMiddleware } from 'redux';
2 | import reduxPromise from 'redux-promise';
3 | import reducers from './reducers';
4 |
5 | const createStoreWithMiddleware = applyMiddleware(reduxPromise)(createStore);
6 |
7 | export default createStoreWithMiddleware(reducers)
8 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/style/style.css:
--------------------------------------------------------------------------------
1 | .list-group-item {
2 | display: inline-block !important;
3 | }
4 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | const $ = _$(window);
15 |
16 | chaiJquery(chai, chai.util, $);
17 |
18 | function renderComponent(ComponentClass, props = {}, state = {}) {
19 | const componentInstance = TestUtils.renderIntoDocument(
20 |
21 |
22 |
23 | );
24 |
25 | return $(ReactDOM.findDOMNode(componentInstance));
26 | }
27 |
28 | $.fn.simulate = function(eventName, value) {
29 | if (value) {
30 | this.val(value);
31 | }
32 | TestUtils.Simulate[eventName](this[0]);
33 | };
34 |
35 | export {renderComponent, expect};
36 |
--------------------------------------------------------------------------------
/005 - A Better Way to Load Data/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | historyApiFallback: true,
21 | contentBase: './'
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
5 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install depdencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/npm-debug.log:
--------------------------------------------------------------------------------
1 | 0 info it worked if it ends with ok
2 | 1 verbose cli [ '/usr/local/Cellar/node/5.7.0/bin/node',
3 | 1 verbose cli '/usr/local/bin/npm',
4 | 1 verbose cli 'start' ]
5 | 2 info using npm@3.6.0
6 | 3 info using node@v5.7.0
7 | 4 verbose stack Error: ENOENT: no such file or directory, open '/Users/stephengrider/workspace/rallycoding/casts/prod/006/proj/package.json'
8 | 4 verbose stack at Error (native)
9 | 5 verbose cwd /Users/stephengrider/workspace/rallycoding/casts/prod/006/proj
10 | 6 error Darwin 15.2.0
11 | 7 error argv "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/bin/npm" "start"
12 | 8 error node v5.7.0
13 | 9 error npm v3.6.0
14 | 10 error path /Users/stephengrider/workspace/rallycoding/casts/prod/006/proj/package.json
15 | 11 error code ENOENT
16 | 12 error errno -2
17 | 13 error syscall open
18 | 14 error enoent ENOENT: no such file or directory, open '/Users/stephengrider/workspace/rallycoding/casts/prod/006/proj/package.json'
19 | 15 error enoent ENOENT: no such file or directory, open '/Users/stephengrider/workspace/rallycoding/casts/prod/006/proj/package.json'
20 | 15 error enoent This is most likely not a problem with npm itself
21 | 15 error enoent and is related to npm not being able to find a file.
22 | 16 verbose exit [ -2, true ]
23 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "babel-preset-stage-1": "^6.1.18",
30 | "faker": "^3.1.0",
31 | "js-image-generator": "^1.0.2",
32 | "lodash": "^3.10.1",
33 | "react": "^0.14.3",
34 | "react-addons-css-transition-group": "^15.0.2",
35 | "react-dom": "^0.14.3",
36 | "react-redux": "^4.0.0",
37 | "react-router": "^2.0.1",
38 | "redux": "^3.0.4"
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/src/actions/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/006 - Animation of React Components/src/actions/index.js
--------------------------------------------------------------------------------
/006 - Animation of React Components/src/components/app.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 | import React, { Component } from 'react';
3 | import Faker from 'faker';
4 | import ReactCSSTransitionGroup from 'react-addons-css-transition-group';
5 |
6 | export default class App extends Component {
7 | constructor (props) {
8 | super(props);
9 |
10 | this.state = { quotes: [] };
11 | }
12 |
13 | onAddClick() {
14 | const quote = Faker.lorem.sentence();
15 | this.setState({ quotes: [ ...this.state.quotes, quote ]});
16 | }
17 |
18 | onRemoveClick(quote) {
19 | this.setState({ quotes: _.without(this.state.quotes, quote) });
20 | }
21 |
22 | renderQuotes() {
23 | return this.state.quotes.map((item, index) => {
24 | return (
25 |
26 | {item}
27 |
28 |
29 | );
30 | });
31 | }
32 |
33 | render() {
34 | const transitionOptions = {
35 | transitionName: "fade",
36 | transitionEnterTimeout: 500,
37 | transitionLeaveTimeout: 500
38 | };
39 |
40 | return (
41 |
42 |
43 |
44 |
45 | {this.renderQuotes()}
46 |
47 |
48 |
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 |
6 | import App from './components/app';
7 | import reducers from './reducers';
8 |
9 | const createStoreWithMiddleware = applyMiddleware()(createStore);
10 |
11 | ReactDOM.render(
12 |
13 |
14 |
15 | , document.querySelector('.container'));
16 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | const rootReducer = combineReducers({
4 | state: (state = {}) => state
5 | });
6 |
7 | export default rootReducer;
8 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/style/style.css:
--------------------------------------------------------------------------------
1 | img {
2 | width: 200px;
3 | }
4 |
5 | ul {
6 | position: relative;
7 | }
8 |
9 | li {
10 | display: flex !important;
11 | justify-content: space-between;
12 | align-items: center;
13 | position: relative;
14 | }
15 |
16 | /* starting state of animation */
17 | .fade-enter {
18 | transform: rotateX(90deg) rotateZ(90deg);
19 | opacity: 0;
20 | }
21 |
22 | /* end state of animation */
23 | .fade-enter-active {
24 | transform: rotateX(0deg) rotateZ(0deg);
25 | opacity: 1.0;
26 | transition: .5s ease-in all;
27 | }
28 |
29 | .fade-leave {
30 | opacity: 1.0;
31 | }
32 |
33 | .fade-leave-active {
34 | opacity: 0;
35 | transition: .5s ease-out all;
36 | }
37 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | const $ = _$(window);
15 |
16 | chaiJquery(chai, chai.util, $);
17 |
18 | function renderComponent(ComponentClass, props = {}, state = {}) {
19 | const componentInstance = TestUtils.renderIntoDocument(
20 |
21 |
22 |
23 | );
24 |
25 | return $(ReactDOM.findDOMNode(componentInstance));
26 | }
27 |
28 | $.fn.simulate = function(eventName, value) {
29 | if (value) {
30 | this.val(value);
31 | }
32 | TestUtils.Simulate[eventName](this[0]);
33 | };
34 |
35 | export {renderComponent, expect};
36 |
--------------------------------------------------------------------------------
/006 - Animation of React Components/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | historyApiFallback: true,
21 | contentBase: './'
22 | }
23 | };
24 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
5 | # IntelliJ
6 | *.iml
7 | /.idea
--------------------------------------------------------------------------------
/008 - Building Modals with React/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install dependencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "babel-preset-stage-1": "^6.1.18",
30 | "lodash": "^3.10.1",
31 | "react": "^0.14.3",
32 | "react-dom": "^0.14.3",
33 | "react-modal": "^1.3.0",
34 | "react-redux": "^4.0.0",
35 | "react-router": "^2.0.1",
36 | "redux": "^3.0.4"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/actions/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/008 - Building Modals with React/src/actions/index.js
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import Colors from './colors';
3 | import BadModal from './bad_modal';
4 | import Modal from './modal';
5 |
6 | export default class App extends Component {
7 | render() {
8 | return (
9 |
10 |
11 |
Hello
Hello
Hello
Hello
Hello
12 |
13 |
14 |
Hello
Hello
Hello
Hello
Hello
15 |
16 |
17 | A really long amount of Modal Content
18 | Etc.
19 |
20 |
21 |
22 |
23 |
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/components/bad_modal.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default ({ children }) => {
4 | return (
5 |
6 | {children}
7 |
8 | );
9 | };
10 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/components/colors.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'react-redux';
3 |
4 | const Colors = ({ colors }) => {
5 | return (
6 |
7 | {colors.map(color =>
{color}
)}
8 |
9 | );
10 | };
11 |
12 | function mapStateToProps({ colors }) {
13 | return { colors };
14 | }
15 |
16 | export default connect(mapStateToProps)(Colors);
17 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/components/modal.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { store } from '../index';
4 | import { Provider } from 'react-redux';
5 |
6 | class Modal extends Component {
7 | componentDidMount() {
8 | this.modalTarget = document.createElement('div');
9 | this.modalTarget.className = 'modal';
10 | document.body.appendChild(this.modalTarget);
11 | this._render();
12 | }
13 |
14 | componentWillUpdate() {
15 | this._render();
16 | }
17 |
18 | componentWillUnmount() {
19 | ReactDOM.unmountComponentAtNode(this.modalTarget);
20 | document.body.removeChild(this.modalTarget);
21 | }
22 |
23 | _render() {
24 | ReactDOM.render(
25 |
26 | {this.props.children}
27 | ,
28 | this.modalTarget
29 | );
30 | }
31 |
32 | render() {
33 | return ;
34 | }
35 | }
36 |
37 | export default Modal;
38 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 |
6 | import App from './components/app';
7 | import reducers from './reducers';
8 |
9 | const createStoreWithMiddleware = applyMiddleware()(createStore);
10 |
11 | export const store = createStoreWithMiddleware(reducers);
12 |
13 | ReactDOM.render(
14 |
15 |
16 |
17 | , document.querySelector('.container'));
18 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | const rootReducer = combineReducers({
4 | colors: () => ['red', 'blue', 'green']
5 | });
6 |
7 | export default rootReducer;
8 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/style/style.css:
--------------------------------------------------------------------------------
1 | .app {
2 | display: flex;
3 | justify-content: space-around;
4 | }
5 |
6 | .left {
7 | z-index: 3;
8 | }
9 |
10 | .right {
11 | position: relative;
12 | z-index: 1;
13 | }
14 |
15 | body .modal {
16 | position: fixed;
17 | top: 40px;
18 | left: 40px;
19 | right: 40px;
20 | bottom: 40px;
21 | border: 1px solid #ccc;
22 | background: #fff;
23 | overflow: auto;
24 | border-radius: 4px;
25 | outline: none;
26 | padding: 20px;
27 | display: block;
28 | }
29 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | global.navigator = global.window.navigator;
15 | const $ = _$(window);
16 |
17 | chaiJquery(chai, chai.util, $);
18 |
19 | function renderComponent(ComponentClass, props = {}, state = {}) {
20 | const componentInstance = TestUtils.renderIntoDocument(
21 |
22 |
23 |
24 | );
25 |
26 | return $(ReactDOM.findDOMNode(componentInstance));
27 | }
28 |
29 | $.fn.simulate = function(eventName, value) {
30 | if (value) {
31 | this.val(value);
32 | }
33 | TestUtils.Simulate[eventName](this[0]);
34 | };
35 |
36 | export {renderComponent, expect};
37 |
--------------------------------------------------------------------------------
/008 - Building Modals with React/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel',
14 | query: {
15 | presets: ['react', 'es2015', 'stage-1']
16 | }
17 | }]
18 | },
19 | resolve: {
20 | extensions: ['', '.js', '.jsx']
21 | },
22 | devServer: {
23 | historyApiFallback: true,
24 | contentBase: './'
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/011/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/011/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
5 | # IntelliJ
6 | *.iml
7 | /.idea
--------------------------------------------------------------------------------
/011/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install dependencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/011/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/011/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "babel-preset-stage-1": "^6.1.18",
30 | "express": "^4.14.0",
31 | "lodash": "^3.10.1",
32 | "react": "^0.14.3",
33 | "react-dom": "^0.14.3",
34 | "react-redux": "^4.0.0",
35 | "react-router": "^2.0.1",
36 | "redux": "^3.0.4"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/011/server.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const path = require('path');
3 | const port = 8080;
4 | const app = express();
5 |
6 | app.use(express.static(__dirname));
7 |
8 | app.get('/api/posts', (req, res) => {
9 | res.send([{ id: 1 }]);
10 | });
11 |
12 | app.get('*', (req, res) => {
13 | res.sendFile(path.resolve(__dirname, 'index.html'));
14 | });
15 |
16 | app.listen(port);
17 | console.log('Server started');
18 |
--------------------------------------------------------------------------------
/011/src/actions/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/011/src/actions/index.js
--------------------------------------------------------------------------------
/011/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { Link } from 'react-router';
3 |
4 | export default class App extends Component {
5 | render() {
6 | return (
7 |
8 |
App
9 | Users
10 |
11 | {this.props.children}
12 |
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/011/src/components/child.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | export default class User extends Component {
4 | render() {
5 | return (
6 |
7 |
8 | - User #1
9 | - User #2
10 | - User #3
11 |
12 |
13 | );
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/011/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 | import { Router, Route, browserHistory } from 'react-router';
6 |
7 | import App from './components/app';
8 | import UsersList from './components/child';
9 | import reducers from './reducers';
10 |
11 | const createStoreWithMiddleware = applyMiddleware()(createStore);
12 |
13 | ReactDOM.render(
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | , document.querySelector('.container'));
22 |
--------------------------------------------------------------------------------
/011/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | const rootReducer = combineReducers({
4 | state: (state = {}) => state
5 | });
6 |
7 | export default rootReducer;
8 |
--------------------------------------------------------------------------------
/011/style/style.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/011/style/style.css
--------------------------------------------------------------------------------
/011/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/011/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | global.navigator = global.window.navigator;
15 | const $ = _$(window);
16 |
17 | chaiJquery(chai, chai.util, $);
18 |
19 | function renderComponent(ComponentClass, props = {}, state = {}) {
20 | const componentInstance = TestUtils.renderIntoDocument(
21 |
22 |
23 |
24 | );
25 |
26 | return $(ReactDOM.findDOMNode(componentInstance));
27 | }
28 |
29 | $.fn.simulate = function(eventName, value) {
30 | if (value) {
31 | this.val(value);
32 | }
33 | TestUtils.Simulate[eventName](this[0]);
34 | };
35 |
36 | export {renderComponent, expect};
37 |
--------------------------------------------------------------------------------
/011/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel',
14 | query: {
15 | presets: ['react', 'es2015', 'stage-1']
16 | }
17 | }]
18 | },
19 | resolve: {
20 | extensions: ['', '.js', '.jsx']
21 | },
22 | devServer: {
23 | historyApiFallback: true,
24 | contentBase: './'
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "dev": "./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "postinstall": "webpack -p",
10 | "start": "node server.js"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {},
15 | "dependencies": {
16 | "axios": "^0.7.0",
17 | "babel-core": "^6.2.1",
18 | "babel-loader": "^6.2.0",
19 | "babel-preset-es2015": "^6.1.18",
20 | "babel-preset-react": "^6.1.18",
21 | "babel-preset-stage-1": "^6.1.18",
22 | "lodash": "^3.10.1",
23 | "react": "^0.14.3",
24 | "react-dom": "^0.14.3",
25 | "react-redux": "^4.0.0",
26 | "redux": "^3.0.4",
27 | "webpack": "^1.12.9",
28 | "webpack-dev-server": "^1.14.0",
29 | "youtube-api-search": "0.0.4"
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/server.js:
--------------------------------------------------------------------------------
1 | const express = require('express');
2 | const path = require('path');
3 | const port = process.env.PORT || 8080;
4 | const app = express();
5 |
6 | app.use(express.static(__dirname));
7 |
8 | app.get('*', (req, res) => {
9 | res.sendFile(path.resolve(__dirname, 'index.html'));
10 | });
11 |
12 | app.listen(port);
13 | console.log('Server started');
14 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/src/components/search_bar.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import _ from 'lodash';
3 |
4 | export default class SearchBar extends Component {
5 | constructor(props) {
6 | super(props);
7 |
8 | this.state = { term: '' };
9 | }
10 |
11 | render() {
12 | return (
13 |
14 | this.onInputChange(event) } />
15 |
16 | );
17 | }
18 |
19 | onInputChange(event) {
20 | const term = event.target.value;
21 |
22 | this.setState({ term });
23 | this.props.onChange(term);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/src/components/video_detail.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default (props) => {
4 | if (!props.video) {
5 | return Loading
;
6 | }
7 |
8 | const videoId = props.video.id.videoId;
9 | const url = `https://www.youtube.com/embed/${videoId}`;
10 |
11 | return (
12 |
13 |
14 |
15 |
16 |
17 |
{props.video.snippet.title}
18 |
{props.video.snippet.description}
19 |
20 |
21 | );
22 | };
23 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/src/components/video_item.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | export default ({ video, onClick }) => {
4 | const imageUrl = video.snippet.thumbnails.default.url;
5 |
6 | return (
7 |
8 |
9 |
10 |

11 |
12 |
13 |
{video.snippet.title}
14 |
15 |
16 |
17 | );
18 | }
19 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/src/components/video_list.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | import VideoItem from './video_item';
4 |
5 | export default class VideoList extends Component {
6 | render() {
7 | return (
8 |
9 | {this.videos()}
10 |
11 | );
12 | }
13 |
14 | videos() {
15 | return this.props.videos.map((video, index) => {
16 | return (
17 | this.props.onVideoSelect(index)}
19 | key={video.etag}
20 | video={video} />
21 | );
22 | });
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/src/index.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import ReactDOM from 'react-dom'
3 |
4 | import YoutubeSearch from 'youtube-api-search';
5 |
6 | import VideoDetail from './components/video_detail';
7 | import VideoList from './components/video_list';
8 | import SearchBar from './components/search_bar';
9 |
10 | class App extends Component {
11 | constructor(props) {
12 | super(props);
13 |
14 | this.search = YoutubeSearch({ key: 'AIzaSyBMC6TKNgaO8ynhaKm6c-0TYsXNzSJXkO8' });
15 |
16 | this.state = {
17 | videos: [],
18 | index: 0
19 | };
20 | this.videoSearch('Music');
21 | }
22 |
23 | render() {
24 | var onSearch = _.debounce((term) => { this.videoSearch(term) }, 250);
25 |
26 | return (
27 |
28 |
29 |
30 |
31 | this.setState({index})} />
34 |
35 |
36 | );
37 | }
38 |
39 | videoSearch(term) {
40 | this.search(term, (videos) => {
41 | this.setState({ videos });
42 | });
43 | }
44 | }
45 |
46 | ReactDOM.render(, document.querySelector('.container'));
47 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/style/style.css:
--------------------------------------------------------------------------------
1 | .search-bar input {
2 | width: 75%;
3 | }
4 |
5 | .video-item img {
6 | max-width: 64px;
7 | }
8 |
9 | .video-detail .details {
10 | margin-top: 10px;
11 | padding: 10px;
12 | border: 1px solid #ddd;
13 | border-radius: 4px;
14 | }
15 |
16 | .list-group-item {
17 | cursor: pointer;
18 | }
19 |
20 | .list-group-item:hover {
21 | background-color: #eee;
22 | }
23 |
--------------------------------------------------------------------------------
/013 - Deployment of Webpack Apps/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel'
14 | }]
15 | },
16 | resolve: {
17 | extensions: ['', '.js', '.jsx']
18 | },
19 | devServer: {
20 | contentBase: './'
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/016/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react", "es2015", "stage-1"]
3 | }
4 |
--------------------------------------------------------------------------------
/016/.gitignore:
--------------------------------------------------------------------------------
1 | /node_modules
2 | bundle.js
3 | npm-debug.log
4 |
5 | # IntelliJ
6 | *.iml
7 | /.idea
--------------------------------------------------------------------------------
/016/README.md:
--------------------------------------------------------------------------------
1 | # ReduxSimpleStarter
2 |
3 | Interested in learning [Redux](https://www.udemy.com/react-redux/)?
4 |
5 | ###Getting Started###
6 |
7 | There are two methods for getting started with this repo.
8 |
9 | ####Familiar with Git?#####
10 | Checkout this repo, install dependencies, then start the gulp process with the following:
11 |
12 | ```
13 | > git clone git@github.com:StephenGrider/ReduxSimpleStarter.git
14 | > cd ReduxSimpleStarter
15 | > npm install
16 | > npm start
17 | ```
18 |
19 | ####Not Familiar with Git?#####
20 | Click [here](https://github.com/StephenGrider/ReactStarter/releases) then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
21 |
22 | ```
23 | > npm install
24 | > npm start
25 | ```
26 |
--------------------------------------------------------------------------------
/016/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/016/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "redux-simple-starter",
3 | "version": "1.0.0",
4 | "description": "Simple starter package for Redux with React and Babel support",
5 | "main": "index.js",
6 | "repository": "git@github.com:StephenGrider/ReduxSimpleStarter.git",
7 | "scripts": {
8 | "start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
9 | "test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
10 | "test:watch": "npm run test -- --watch"
11 | },
12 | "author": "",
13 | "license": "ISC",
14 | "devDependencies": {
15 | "babel-core": "^6.2.1",
16 | "babel-loader": "^6.2.0",
17 | "babel-preset-es2015": "^6.1.18",
18 | "babel-preset-react": "^6.1.18",
19 | "chai": "^3.5.0",
20 | "chai-jquery": "^2.0.0",
21 | "jquery": "^2.2.1",
22 | "jsdom": "^8.1.0",
23 | "mocha": "^2.4.5",
24 | "react-addons-test-utils": "^0.14.7",
25 | "webpack": "^1.12.9",
26 | "webpack-dev-server": "^1.14.0"
27 | },
28 | "dependencies": {
29 | "babel-preset-stage-1": "^6.1.18",
30 | "lodash": "^3.10.1",
31 | "react": "^0.14.3",
32 | "react-dom": "^0.14.3",
33 | "react-redux": "^4.0.0",
34 | "react-router": "^2.0.1",
35 | "redux": "^3.0.4"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/016/src/actions/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/016/src/actions/index.js
--------------------------------------------------------------------------------
/016/src/components/app.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import GoogleMap from './google_map';
3 |
4 | export default class App extends Component {
5 | constructor(props) {
6 | super(props);
7 |
8 | this.state = { lat: -34.397, lng: 150.644 };
9 | }
10 |
11 | render() {
12 | return (
13 |
14 | Map me!
15 |
18 |
19 |
20 | );
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/016/src/components/google_map.js:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 |
3 | export default class extends Component {
4 | shouldComponentUpdate() {
5 | return false;
6 | }
7 |
8 | componentWillReceiveProps(nextProps) {
9 | this.map.panTo({ lat: nextProps.lat, lng: nextProps.lng });
10 | }
11 |
12 | componentDidMount() {
13 | this.map = new google.maps.Map(this.refs.map, {
14 | center: { lat: this.props.lat, lng: this.props.lng },
15 | zoom: 8
16 | });
17 | }
18 |
19 | render() {
20 | return (
21 |
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/016/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import { Provider } from 'react-redux';
4 | import { createStore, applyMiddleware } from 'redux';
5 |
6 | import App from './components/app';
7 | import reducers from './reducers';
8 |
9 | const createStoreWithMiddleware = applyMiddleware()(createStore);
10 |
11 | ReactDOM.render(
12 |
13 |
14 |
15 | , document.querySelector('.container'));
16 |
--------------------------------------------------------------------------------
/016/src/reducers/index.js:
--------------------------------------------------------------------------------
1 | import { combineReducers } from 'redux';
2 |
3 | const rootReducer = combineReducers({
4 | state: (state = {}) => state
5 | });
6 |
7 | export default rootReducer;
8 |
--------------------------------------------------------------------------------
/016/style/style.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/016/style/style.css
--------------------------------------------------------------------------------
/016/test/components/app_test.js:
--------------------------------------------------------------------------------
1 | import { renderComponent , expect } from '../test_helper';
2 | import App from '../../src/components/app';
3 |
4 | describe('App' , () => {
5 | let component;
6 |
7 | beforeEach(() => {
8 | component = renderComponent(App);
9 | });
10 |
11 | it('renders something', () => {
12 | expect(component).to.exist;
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/016/test/test_helper.js:
--------------------------------------------------------------------------------
1 | import _$ from 'jquery';
2 | import React from 'react';
3 | import ReactDOM from 'react-dom';
4 | import TestUtils from 'react-addons-test-utils';
5 | import jsdom from 'jsdom';
6 | import chai, { expect } from 'chai';
7 | import chaiJquery from 'chai-jquery';
8 | import { Provider } from 'react-redux';
9 | import { createStore } from 'redux';
10 | import reducers from '../src/reducers';
11 |
12 | global.document = jsdom.jsdom('');
13 | global.window = global.document.defaultView;
14 | global.navigator = global.window.navigator;
15 | const $ = _$(window);
16 |
17 | chaiJquery(chai, chai.util, $);
18 |
19 | function renderComponent(ComponentClass, props = {}, state = {}) {
20 | const componentInstance = TestUtils.renderIntoDocument(
21 |
22 |
23 |
24 | );
25 |
26 | return $(ReactDOM.findDOMNode(componentInstance));
27 | }
28 |
29 | $.fn.simulate = function(eventName, value) {
30 | if (value) {
31 | this.val(value);
32 | }
33 | TestUtils.Simulate[eventName](this[0]);
34 | };
35 |
36 | export {renderComponent, expect};
37 |
--------------------------------------------------------------------------------
/016/webpack.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | entry: [
3 | './src/index.js'
4 | ],
5 | output: {
6 | path: __dirname,
7 | publicPath: '/',
8 | filename: 'bundle.js'
9 | },
10 | module: {
11 | loaders: [{
12 | exclude: /node_modules/,
13 | loader: 'babel',
14 | query: {
15 | presets: ['react', 'es2015', 'stage-1']
16 | }
17 | }]
18 | },
19 | resolve: {
20 | extensions: ['', '.js', '.jsx']
21 | },
22 | devServer: {
23 | historyApiFallback: true,
24 | contentBase: './'
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react-native"]
3 | }
4 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.buckconfig:
--------------------------------------------------------------------------------
1 |
2 | [android]
3 | target = Google Inc.:Google APIs:23
4 |
5 | [maven_repositories]
6 | central = https://repo1.maven.org/maven2
7 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 | .*/Libraries/react-native/ReactNative.js
16 |
17 | [include]
18 |
19 | [libs]
20 | node_modules/react-native/Libraries/react-native/react-native-interface.js
21 | node_modules/react-native/flow
22 | flow/
23 |
24 | [options]
25 | emoji=true
26 |
27 | module.system=haste
28 |
29 | experimental.strict_type_args=true
30 |
31 | munge_underscores=true
32 |
33 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
34 |
35 | suppress_type=$FlowIssue
36 | suppress_type=$FlowFixMe
37 | suppress_type=$FixMe
38 |
39 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-5]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
41 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
43 |
44 | unsafe.enable_getters_and_setters=true
45 |
46 | [version]
47 | ^0.45.0
48 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.gitattributes:
--------------------------------------------------------------------------------
1 | *.pbxproj -text
2 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.gitignore:
--------------------------------------------------------------------------------
1 | # OSX
2 | #
3 | .DS_Store
4 |
5 | # Xcode
6 | #
7 | build/
8 | *.pbxuser
9 | !default.pbxuser
10 | *.mode1v3
11 | !default.mode1v3
12 | *.mode2v3
13 | !default.mode2v3
14 | *.perspectivev3
15 | !default.perspectivev3
16 | xcuserdata
17 | *.xccheckout
18 | *.moved-aside
19 | DerivedData
20 | *.hmap
21 | *.ipa
22 | *.xcuserstate
23 | project.xcworkspace
24 |
25 | # Android/IntelliJ
26 | #
27 | build/
28 | .idea
29 | .gradle
30 | local.properties
31 | *.iml
32 |
33 | # node.js
34 | #
35 | node_modules/
36 | npm-debug.log
37 | yarn-error.log
38 |
39 | # BUCK
40 | buck-out/
41 | \.buckd/
42 | *.keystore
43 |
44 | # fastlane
45 | #
46 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47 | # screenshots whenever they are needed.
48 | # For more information about the recommended setup visit:
49 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
50 |
51 | fastlane/report.xml
52 | fastlane/Preview.html
53 | fastlane/screenshots
54 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/__tests__/index.android.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.android.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create(
10 |
11 | );
12 | });
13 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/__tests__/index.ios.js:
--------------------------------------------------------------------------------
1 | import 'react-native';
2 | import React from 'react';
3 | import Index from '../index.ios.js';
4 |
5 | // Note: test renderer must be required after react-native.
6 | import renderer from 'react-test-renderer';
7 |
8 | it('renders correctly', () => {
9 | const tree = renderer.create();
10 | });
11 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/BUCK:
--------------------------------------------------------------------------------
1 | # To learn about Buck see [Docs](https://buckbuild.com/).
2 | # To run your application with Buck:
3 | # - install Buck
4 | # - `npm start` - to start the packager
5 | # - `cd android`
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8 | # - `buck install -r android/app` - compile, install and run application
9 | #
10 |
11 | lib_deps = []
12 |
13 | for jarfile in glob(['libs/*.jar']):
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
15 | lib_deps.append(':' + name)
16 | prebuilt_jar(
17 | name = name,
18 | binary_jar = jarfile,
19 | )
20 |
21 | for aarfile in glob(['libs/*.aar']):
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
23 | lib_deps.append(':' + name)
24 | android_prebuilt_aar(
25 | name = name,
26 | aar = aarfile,
27 | )
28 |
29 | android_library(
30 | name = "all-libs",
31 | exported_deps = lib_deps,
32 | )
33 |
34 | android_library(
35 | name = "app-code",
36 | srcs = glob([
37 | "src/main/java/**/*.java",
38 | ]),
39 | deps = [
40 | ":all-libs",
41 | ":build_config",
42 | ":res",
43 | ],
44 | )
45 |
46 | android_build_config(
47 | name = "build_config",
48 | package = "com.rn_cli_example",
49 | )
50 |
51 | android_resource(
52 | name = "res",
53 | package = "com.rn_cli_example",
54 | res = "src/main/res",
55 | )
56 |
57 | android_binary(
58 | name = "app",
59 | keystore = "//android/keystores:debug",
60 | manifest = "src/main/AndroidManifest.xml",
61 | package_type = "debug",
62 | deps = [
63 | ":app-code",
64 | ],
65 | )
66 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
12 |
13 |
19 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/java/com/rn_cli_example/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.rn_cli_example;
2 |
3 | import com.facebook.react.ReactActivity;
4 |
5 | public class MainActivity extends ReactActivity {
6 |
7 | /**
8 | * Returns the name of the main component registered from JavaScript.
9 | * This is used to schedule rendering of the component.
10 | */
11 | @Override
12 | protected String getMainComponentName() {
13 | return "rn_cli_example";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/java/com/rn_cli_example/MainApplication.java:
--------------------------------------------------------------------------------
1 | package com.rn_cli_example;
2 |
3 | import android.app.Application;
4 |
5 | import com.facebook.react.ReactApplication;
6 | import com.facebook.react.ReactNativeHost;
7 | import com.facebook.react.ReactPackage;
8 | import com.facebook.react.shell.MainReactPackage;
9 | import com.facebook.soloader.SoLoader;
10 |
11 | import java.util.Arrays;
12 | import java.util.List;
13 |
14 | public class MainApplication extends Application implements ReactApplication {
15 |
16 | private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
17 | @Override
18 | public boolean getUseDeveloperSupport() {
19 | return BuildConfig.DEBUG;
20 | }
21 |
22 | @Override
23 | protected List getPackages() {
24 | return Arrays.asList(
25 | new MainReactPackage()
26 | );
27 | }
28 | };
29 |
30 | @Override
31 | public ReactNativeHost getReactNativeHost() {
32 | return mReactNativeHost;
33 | }
34 |
35 | @Override
36 | public void onCreate() {
37 | super.onCreate();
38 | SoLoader.init(this, /* native exopackage */ false);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/017 - React Native Testing/rn_cli_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | rn_cli_example
3 |
4 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | repositories {
5 | jcenter()
6 | }
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:2.2.3'
9 |
10 | // NOTE: Do not place your application dependencies here; they belong
11 | // in the individual module build.gradle files
12 | }
13 | }
14 |
15 | allprojects {
16 | repositories {
17 | mavenLocal()
18 | jcenter()
19 | maven {
20 | // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
21 | url "$rootDir/../node_modules/react-native/android"
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
19 |
20 | android.useDeprecatedNdk=true
21 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/017 - React Native Testing/rn_cli_example/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/keystores/BUCK:
--------------------------------------------------------------------------------
1 | keystore(
2 | name = "debug",
3 | properties = "debug.keystore.properties",
4 | store = "debug.keystore",
5 | visibility = [
6 | "PUBLIC",
7 | ],
8 | )
9 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/keystores/debug.keystore.properties:
--------------------------------------------------------------------------------
1 | key.store=debug.keystore
2 | key.alias=androiddebugkey
3 | key.store.password=android
4 | key.alias.password=android
5 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'rn_cli_example'
2 |
3 | include ':app'
4 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rn_cli_example",
3 | "displayName": "rn_cli_example"
4 | }
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/index.android.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | export default class rn_cli_example extends Component {
16 | render() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.android.js
24 |
25 |
26 | Double tap R on your keyboard to reload,{'\n'}
27 | Shake or press menu button for dev menu
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | justifyContent: 'center',
38 | alignItems: 'center',
39 | backgroundColor: '#F5FCFF',
40 | },
41 | welcome: {
42 | fontSize: 20,
43 | textAlign: 'center',
44 | margin: 10,
45 | },
46 | instructions: {
47 | textAlign: 'center',
48 | color: '#333333',
49 | marginBottom: 5,
50 | },
51 | });
52 |
53 | AppRegistry.registerComponent('rn_cli_example', () => rn_cli_example);
54 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/index.ios.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Sample React Native App
3 | * https://github.com/facebook/react-native
4 | * @flow
5 | */
6 |
7 | import React, { Component } from 'react';
8 | import {
9 | AppRegistry,
10 | StyleSheet,
11 | Text,
12 | View
13 | } from 'react-native';
14 |
15 | export default class rn_cli_example extends Component {
16 | render() {
17 | return (
18 |
19 |
20 | Welcome to React Native!
21 |
22 |
23 | To get started, edit index.ios.js
24 |
25 |
26 | Press Cmd+R to reload,{'\n'}
27 | Cmd+D or shake for dev menu
28 |
29 |
30 | );
31 | }
32 | }
33 |
34 | const styles = StyleSheet.create({
35 | container: {
36 | flex: 1,
37 | justifyContent: 'center',
38 | alignItems: 'center',
39 | backgroundColor: '#F5FCFF',
40 | },
41 | welcome: {
42 | fontSize: 20,
43 | textAlign: 'center',
44 | margin: 10,
45 | },
46 | instructions: {
47 | textAlign: 'center',
48 | color: '#333333',
49 | marginBottom: 5,
50 | },
51 | });
52 |
53 | AppRegistry.registerComponent('rn_cli_example', () => rn_cli_example);
54 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example-tvOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UIViewControllerBasedStatusBarAppearance
38 |
39 | NSLocationWhenInUseUsageDescription
40 |
41 | NSAppTransportSecurity
42 |
43 |
44 | NSExceptionDomains
45 |
46 | localhost
47 |
48 | NSExceptionAllowsInsecureHTTPLoads
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example-tvOSTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example/AppDelegate.h:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | @interface AppDelegate : UIResponder
13 |
14 | @property (nonatomic, strong) UIWindow *window;
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example/AppDelegate.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import "AppDelegate.h"
11 |
12 | #import
13 | #import
14 |
15 | @implementation AppDelegate
16 |
17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
18 | {
19 | NSURL *jsCodeLocation;
20 |
21 | jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
22 |
23 | RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
24 | moduleName:@"rn_cli_example"
25 | initialProperties:nil
26 | launchOptions:launchOptions];
27 | rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
28 |
29 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
30 | UIViewController *rootViewController = [UIViewController new];
31 | rootViewController.view = rootView;
32 | self.window.rootViewController = rootViewController;
33 | [self.window makeKeyAndVisible];
34 | return YES;
35 | }
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | rn_cli_example
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UIViewControllerBasedStatusBarAppearance
40 |
41 | NSLocationWhenInUseUsageDescription
42 |
43 | NSAppTransportSecurity
44 |
45 |
46 | NSExceptionDomains
47 |
48 | localhost
49 |
50 | NSExceptionAllowsInsecureHTTPLoads
51 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_example/main.m:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) 2015-present, Facebook, Inc.
3 | * All rights reserved.
4 | *
5 | * This source code is licensed under the BSD-style license found in the
6 | * LICENSE file in the root directory of this source tree. An additional grant
7 | * of patent rights can be found in the PATENTS file in the same directory.
8 | */
9 |
10 | #import
11 |
12 | #import "AppDelegate.h"
13 |
14 | int main(int argc, char * argv[]) {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/ios/rn_cli_exampleTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/017 - React Native Testing/rn_cli_example/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "rn_cli_example",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node node_modules/react-native/local-cli/cli.js start",
7 | "test": "jest"
8 | },
9 | "dependencies": {
10 | "react": "16.0.0-alpha.12",
11 | "react-native": "0.45.1"
12 | },
13 | "devDependencies": {
14 | "babel-jest": "20.0.3",
15 | "babel-preset-react-native": "2.0.0",
16 | "jest": "20.0.4",
17 | "react-test-renderer": "16.0.0-alpha.12"
18 | },
19 | "jest": {
20 | "preset": "react-native"
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["babel-preset-expo"],
3 | "env": {
4 | "development": {
5 | "plugins": ["transform-react-jsx-source"]
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/.flowconfig:
--------------------------------------------------------------------------------
1 | [ignore]
2 | ; We fork some components by platform
3 | .*/*[.]android.js
4 |
5 | ; Ignore "BUCK" generated dirs
6 | /\.buckd/
7 |
8 | ; Ignore unexpected extra "@providesModule"
9 | .*/node_modules/.*/node_modules/fbjs/.*
10 |
11 | ; Ignore duplicate module providers
12 | ; For RN Apps installed via npm, "Libraries" folder is inside
13 | ; "node_modules/react-native" but in the source repo it is in the root
14 | .*/Libraries/react-native/React.js
15 | .*/Libraries/react-native/ReactNative.js
16 |
17 | ; Additional create-react-native-app ignores
18 |
19 | ; Ignore duplicate module providers
20 | .*/node_modules/fbemitter/lib/*
21 |
22 | ; Ignore misbehaving dev-dependencies
23 | .*/node_modules/xdl/build/*
24 | .*/node_modules/reqwest/tests/*
25 |
26 | ; Ignore missing expo-sdk dependencies (temporarily)
27 | ; https://github.com/expo/expo/issues/162
28 | .*/node_modules/expo/src/*
29 |
30 | ; Ignore react-native-fbads dependency of the expo sdk
31 | .*/node_modules/react-native-fbads/*
32 |
33 | [include]
34 |
35 | [libs]
36 | node_modules/react-native/Libraries/react-native/react-native-interface.js
37 | node_modules/react-native/flow
38 | flow/
39 |
40 | [options]
41 | module.system=haste
42 |
43 | emoji=true
44 |
45 | experimental.strict_type_args=true
46 |
47 | munge_underscores=true
48 |
49 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
50 |
51 | suppress_type=$FlowIssue
52 | suppress_type=$FlowFixMe
53 | suppress_type=$FixMe
54 |
55 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
56 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-2]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
57 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
58 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
59 |
60 | unsafe.enable_getters_and_setters=true
61 |
62 | [version]
63 | ^0.42.0
64 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | .expo/
3 | npm-debug.*
4 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/.watchmanconfig:
--------------------------------------------------------------------------------
1 | {}
2 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/App.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { StyleSheet, Text, View } from 'react-native';
3 |
4 | export default class App extends React.Component {
5 | render() {
6 | return (
7 |
8 | Changes you make will automatically reload.
9 |
10 | {this.props.headerText}
11 | Shake your phone to open the developer menu.
12 |
13 |
14 | );
15 | }
16 | }
17 |
18 | const styles = StyleSheet.create({
19 | container: {
20 | flex: 1,
21 | backgroundColor: '#fff',
22 | alignItems: 'center',
23 | justifyContent: 'center'
24 | }
25 | });
26 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/App.test.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import App from './App';
3 |
4 | import renderer from 'react-test-renderer';
5 |
6 | it('renders without crashing', () => {
7 | const rendered = renderer.create().toJSON();
8 |
9 | expect(rendered).toMatchSnapshot();
10 | });
11 |
12 | it('renders with given text', () => {
13 | const rendered = renderer.create().toJSON();
14 |
15 | expect(rendered).toMatchSnapshot();
16 | });
17 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/__snapshots__/App.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`renders with given text 1`] = `
4 |
14 |
19 | Changes you make will automatically reload.
20 |
21 |
26 | Hi There
27 | Shake your phone to open the developer menu.
28 |
29 |
30 | `;
31 |
32 | exports[`renders without crashing 1`] = `
33 |
43 |
48 | Changes you make will automatically reload.
49 |
50 |
55 | Shake your phone to open the developer menu.
56 |
57 |
58 | `;
59 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "expo": {
3 | "sdkVersion": "17.0.0"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/017 - React Native Testing/testing/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "testing",
3 | "version": "0.1.0",
4 | "private": true,
5 | "devDependencies": {
6 | "react-native-scripts": "0.0.31",
7 | "jest-expo": "~1.0.1",
8 | "react-test-renderer": "16.0.0-alpha.6"
9 | },
10 | "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
11 | "scripts": {
12 | "start": "react-native-scripts start",
13 | "eject": "react-native-scripts eject",
14 | "android": "react-native-scripts android",
15 | "ios": "react-native-scripts ios",
16 | "test": "node node_modules/jest/bin/jest.js --watch"
17 | },
18 | "jest": {
19 | "preset": "jest-expo"
20 | },
21 | "dependencies": {
22 | "expo": "^17.0.0",
23 | "react": "16.0.0-alpha.6",
24 | "react-native": "^0.44.0"
25 | }
26 | }
--------------------------------------------------------------------------------
/018 - RN vs Flutter/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/018 - RN vs Flutter/.gitkeep
--------------------------------------------------------------------------------
/019 - Animations/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/.gitkeep
--------------------------------------------------------------------------------
/019 - Animations/dev/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | .flutter-plugins
10 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.idea/runConfigurations/main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/019 - Animations/dev/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/019 - Animations/dev/README.md:
--------------------------------------------------------------------------------
1 | # scoped
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | For help getting started with Flutter, view our online
8 | [documentation](https://flutter.io/).
9 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | apply plugin: 'com.android.application'
15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16 |
17 | android {
18 | compileSdkVersion 27
19 |
20 | lintOptions {
21 | disable 'InvalidPackage'
22 | }
23 |
24 | defaultConfig {
25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
26 | applicationId "com.example.scoped"
27 | minSdkVersion 21
28 | targetSdkVersion 27
29 | versionCode 1
30 | versionName "1.0"
31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
32 | }
33 |
34 | buildTypes {
35 | release {
36 | // TODO: Add your own signing config for the release build.
37 | // Signing with the debug keys for now, so `flutter run --release` works.
38 | signingConfig signingConfigs.debug
39 | }
40 | }
41 | }
42 |
43 | flutter {
44 | source '../..'
45 | }
46 |
47 | dependencies {
48 | testImplementation 'junit:junit:4.12'
49 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
51 | }
52 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/java/com/example/scoped/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.scoped;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/dev/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/019 - Animations/dev/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/019 - Animations/dev/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | scoped
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/019 - Animations/dev/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/019 - Animations/dev/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | void main() => runApp(MyHomePage());
4 |
5 | class MyHomePage extends StatefulWidget {
6 | @override
7 | _MyHomePageState createState() => _MyHomePageState();
8 | }
9 |
10 | class _MyHomePageState extends State with TickerProviderStateMixin {
11 | AnimationController _controller;
12 |
13 | @override
14 | initState() {
15 | super.initState();
16 |
17 | _controller = AnimationController(
18 | lowerBound: 50.0,
19 | upperBound: 300.0,
20 | vsync: this,
21 | duration: Duration(seconds: 1),
22 | );
23 | }
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return MaterialApp(
28 | home: Scaffold(
29 | body: GestureDetector(
30 | onTap: () {
31 | final status = _controller.status;
32 | if (status == AnimationStatus.completed) {
33 | _controller.reverse();
34 | } else {
35 | _controller.animateTo(
36 | 300.0,
37 | curve: Curves.bounceOut,
38 | );
39 | }
40 | },
41 | child: Center(
42 | child: AnimatedBuilder(
43 | animation: _controller,
44 | child: Container(
45 | color: Colors.red,
46 | constraints: BoxConstraints.expand(),
47 | ),
48 | builder: (context, child) {
49 | return Container(
50 | child: child,
51 | height: _controller.value,
52 | width: _controller.value,
53 | );
54 | },
55 | ),
56 | ),
57 | ),
58 | ),
59 | );
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/019 - Animations/dev/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: scoped
2 | description: A new Flutter project.
3 |
4 | dependencies:
5 | flutter:
6 | sdk: flutter
7 |
8 | # The following adds the Cupertino Icons font to your application.
9 | # Use with the CupertinoIcons class for iOS style icons.
10 | cupertino_icons: ^0.1.2
11 | camera: any
12 |
13 | dev_dependencies:
14 | flutter_test:
15 | sdk: flutter
16 |
17 |
18 | # For information on the generic Dart part of this file, see the
19 | # following page: https://www.dartlang.org/tools/pub/pubspec
20 |
21 | # The following section is specific to Flutter.
22 | flutter:
23 |
24 | # The following line ensures that the Material Icons font is
25 | # included with your application, so that you can use the icons in
26 | # the material Icons class.
27 | uses-material-design: true
28 |
29 | # To add assets to your application, add an assets section, like this:
30 | # assets:
31 | # - images/a_dot_burr.jpeg
32 | # - images/a_dot_ham.jpeg
33 |
34 | # An image asset can refer to one or more resolution-specific "variants", see
35 | # https://flutter.io/assets-and-images/#resolution-aware.
36 |
37 | # For details regarding adding assets from package dependencies, see
38 | # https://flutter.io/assets-and-images/#from-packages
39 |
40 | # To add custom fonts to your application, add a fonts section here,
41 | # in this "flutter" section. Each entry in this list should have a
42 | # "family" key with the font family name, and a "fonts" key with a
43 | # list giving the asset and other descriptors for the font. For
44 | # example:
45 | # fonts:
46 | # - family: Schyler
47 | # fonts:
48 | # - asset: fonts/Schyler-Regular.ttf
49 | # - asset: fonts/Schyler-Italic.ttf
50 | # style: italic
51 | # - family: Trajan Pro
52 | # fonts:
53 | # - asset: fonts/TrajanPro.ttf
54 | # - asset: fonts/TrajanPro_Bold.ttf
55 | # weight: 700
56 | #
57 | # For details regarding fonts from package dependencies,
58 | # see https://flutter.io/custom-fonts/#from-packages
59 |
--------------------------------------------------------------------------------
/019 - Animations/dev/scoped.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/019 - Animations/dev/scoped_android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/019 - Animations/dev/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties
5 | // are correct.
6 |
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | import 'package:scoped/main.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(new MyApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | .flutter-plugins
10 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.idea/libraries/Flutter_for_Android.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.idea/runConfigurations/main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.idea/workspace.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/019 - Animations/prod/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b
8 | channel: beta
9 |
--------------------------------------------------------------------------------
/019 - Animations/prod/README.md:
--------------------------------------------------------------------------------
1 | # prod
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | For help getting started with Flutter, view our online
8 | [documentation](https://flutter.io/).
9 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | *.class
3 | .gradle
4 | /local.properties
5 | /.idea/workspace.xml
6 | /.idea/libraries
7 | .DS_Store
8 | /build
9 | /captures
10 | GeneratedPluginRegistrant.java
11 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | apply plugin: 'com.android.application'
15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
16 |
17 | android {
18 | compileSdkVersion 27
19 |
20 | lintOptions {
21 | disable 'InvalidPackage'
22 | }
23 |
24 | defaultConfig {
25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
26 | applicationId "com.example.prod"
27 | minSdkVersion 16
28 | targetSdkVersion 27
29 | versionCode 1
30 | versionName "1.0"
31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
32 | }
33 |
34 | buildTypes {
35 | release {
36 | // TODO: Add your own signing config for the release build.
37 | // Signing with the debug keys for now, so `flutter run --release` works.
38 | signingConfig signingConfigs.debug
39 | }
40 | }
41 | }
42 |
43 | flutter {
44 | source '../..'
45 | }
46 |
47 | dependencies {
48 | testImplementation 'junit:junit:4.12'
49 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
51 | }
52 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/java/com/example/prod/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.prod;
2 |
3 | import android.os.Bundle;
4 | import io.flutter.app.FlutterActivity;
5 | import io.flutter.plugins.GeneratedPluginRegistrant;
6 |
7 | public class MainActivity extends FlutterActivity {
8 | @Override
9 | protected void onCreate(Bundle savedInstanceState) {
10 | super.onCreate(savedInstanceState);
11 | GeneratedPluginRegistrant.registerWith(this);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/019 - Animations/prod/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.0.1'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/android/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/019 - Animations/prod/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/019 - Animations/prod/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/app.flx
37 | /Flutter/app.zip
38 | /Flutter/flutter_assets/
39 | /Flutter/App.framework
40 | /Flutter/Flutter.framework
41 | /Flutter/Generated.xcconfig
42 | /ServiceDefinitions.json
43 |
44 | Pods/
45 | .symlinks/
46 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | prod
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/019 - Animations/prod/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/019 - Animations/prod/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | void main() {
4 | runApp(AnimationDemo());
5 | }
6 |
7 | class AnimationDemo extends StatefulWidget {
8 | @override
9 | createState() => _AnimationDemoState();
10 | }
11 |
12 | class _AnimationDemoState extends State
13 | with TickerProviderStateMixin {
14 | AnimationController _controller;
15 |
16 | @override
17 | initState() {
18 | super.initState();
19 |
20 | _controller = AnimationController(
21 | value: 50.0,
22 | lowerBound: 50.0,
23 | upperBound: 300.0,
24 | duration: Duration(seconds: 1),
25 | vsync: this,
26 | );
27 | }
28 |
29 | @override
30 | Widget build(context) {
31 | return MaterialApp(
32 | home: Scaffold(
33 | body: GestureDetector(
34 | onTap: () {
35 | final status = _controller.status;
36 | if (status == AnimationStatus.completed) {
37 | _controller.reverse();
38 | } else {
39 | _controller.animateTo(
40 | 300.0,
41 | curve: Curves.bounceOut,
42 | );
43 | }
44 | },
45 | child: Center(
46 | child: AnimatedBuilder(
47 | animation: _controller,
48 | builder: (context, child) {
49 | return Container(
50 | child: child,
51 | height: _controller.value,
52 | width: _controller.value,
53 | );
54 | },
55 | child: Container(
56 | color: Colors.red,
57 | constraints: BoxConstraints.expand(),
58 | ),
59 | ),
60 | ),
61 | ),
62 | ),
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/019 - Animations/prod/prod.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/019 - Animations/prod/prod_android.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/019 - Animations/prod/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: prod
2 | description: A new Flutter project.
3 |
4 | dependencies:
5 | flutter:
6 | sdk: flutter
7 |
8 | # The following adds the Cupertino Icons font to your application.
9 | # Use with the CupertinoIcons class for iOS style icons.
10 | cupertino_icons: ^0.1.2
11 |
12 | dev_dependencies:
13 | flutter_test:
14 | sdk: flutter
15 |
16 |
17 | # For information on the generic Dart part of this file, see the
18 | # following page: https://www.dartlang.org/tools/pub/pubspec
19 |
20 | # The following section is specific to Flutter.
21 | flutter:
22 |
23 | # The following line ensures that the Material Icons font is
24 | # included with your application, so that you can use the icons in
25 | # the material Icons class.
26 | uses-material-design: true
27 |
28 | # To add assets to your application, add an assets section, like this:
29 | # assets:
30 | # - images/a_dot_burr.jpeg
31 | # - images/a_dot_ham.jpeg
32 |
33 | # An image asset can refer to one or more resolution-specific "variants", see
34 | # https://flutter.io/assets-and-images/#resolution-aware.
35 |
36 | # For details regarding adding assets from package dependencies, see
37 | # https://flutter.io/assets-and-images/#from-packages
38 |
39 | # To add custom fonts to your application, add a fonts section here,
40 | # in this "flutter" section. Each entry in this list should have a
41 | # "family" key with the font family name, and a "fonts" key with a
42 | # list giving the asset and other descriptors for the font. For
43 | # example:
44 | # fonts:
45 | # - family: Schyler
46 | # fonts:
47 | # - asset: fonts/Schyler-Regular.ttf
48 | # - asset: fonts/Schyler-Italic.ttf
49 | # style: italic
50 | # - family: Trajan Pro
51 | # fonts:
52 | # - asset: fonts/TrajanPro.ttf
53 | # - asset: fonts/TrajanPro_Bold.ttf
54 | # weight: 700
55 | #
56 | # For details regarding fonts from package dependencies,
57 | # see https://flutter.io/custom-fonts/#from-packages
58 |
--------------------------------------------------------------------------------
/019 - Animations/prod/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties
5 | // are correct.
6 |
7 | import 'package:flutter/material.dart';
8 | import 'package:flutter_test/flutter_test.dart';
9 |
10 | import 'package:prod/main.dart';
11 |
12 | void main() {
13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
14 | // Build our app and trigger a frame.
15 | await tester.pumpWidget(new MyApp());
16 |
17 | // Verify that our counter starts at 0.
18 | expect(find.text('0'), findsOneWidget);
19 | expect(find.text('1'), findsNothing);
20 |
21 | // Tap the '+' icon and trigger a frame.
22 | await tester.tap(find.byIcon(Icons.add));
23 | await tester.pump();
24 |
25 | // Verify that our counter has incremented.
26 | expect(find.text('0'), findsNothing);
27 | expect(find.text('1'), findsOneWidget);
28 | });
29 | }
30 |
--------------------------------------------------------------------------------
/20 - redux/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/StephenGrider/RallyCodingWeekly/acda863ee55fe5af19c3e9e9bceed997dcf0ec0c/20 - redux/.gitkeep
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Stephen Grider
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | #RallyCoding
2 |
3 |
4 | Weekly videos on the Javascript and React Ecosystem.
5 |
6 | Each separate folder contains the code for each weekly video. You can run any individual project by running `npm install` then `npm start`, then navigate to `localhost:8080` in your browser.
7 |
8 | ### Videos
9 |
10 | Check it out here: [RallyCoding.com](http://www.rallycoding.com)
11 |
12 | ### Tutorials
13 |
14 | Interested in learning more about React and Redux? Check out [Modern React with Redux](https://www.udemy.com/react-redux/?couponCode=rallycoding19) if you're just getting started, or [Advanced React and Redux](https://www.udemy.com/react-redux-tutorial/?couponCode=rallycoding19) if you're looking for some more challenging material.
15 |
--------------------------------------------------------------------------------