Compare commits
12 Commits
separate-s
...
master
Author | SHA1 | Date |
---|---|---|
Jenna Afarian | 92ce27e1c2 | |
Jenna Afarian | 8d4e8100be | |
Jenna Afarian | 1a6ac71d5b | |
stephengrider | cc77442f71 | |
Stephen Grider | ce8e6ed8ed | |
Stephen Grider | dca6c09312 | |
Stephen Grider | 47c5d70831 | |
Stephen Grider | 6f4576eed2 | |
stephengrider | f67d6b1197 | |
stephengrider | 6c8f6a25f1 | |
stephengrider | 35b6363915 | |
stephengrider | 1af735f5eb |
|
@ -4,7 +4,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="/style/style.css">
|
||||
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/48938155eb24b4ccdde09426066869504c6dab3c/dist/css/bootstrap.min.css">
|
||||
<script src="https://maps.googleapis.com/maps/api/js"></script>
|
||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAq06l5RUVfib62IYRQacLc-KAy0XIWAVs"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container"></div>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
16
package.json
16
package.json
|
@ -16,22 +16,16 @@
|
|||
"babel-loader": "^6.2.0",
|
||||
"babel-preset-es2015": "^6.1.18",
|
||||
"babel-preset-react": "^6.1.18",
|
||||
"chai": "^3.5.0",
|
||||
"chai-jquery": "^2.0.0",
|
||||
"jquery": "^2.2.1",
|
||||
"jsdom": "^8.1.0",
|
||||
"mocha": "^2.4.5",
|
||||
"react-addons-test-utils": "^0.14.7",
|
||||
"webpack": "^1.12.9",
|
||||
"webpack-dev-server": "^1.14.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"babel-preset-stage-1": "^6.1.18",
|
||||
"lodash": "^3.10.1",
|
||||
"react": "^0.14.3",
|
||||
"react-dom": "^0.14.3",
|
||||
"react-redux": "4.3.0",
|
||||
"react-router": "^2.0.1",
|
||||
"redux": "^3.0.4"
|
||||
"react": "16.3.2",
|
||||
"react-dom": "16.3.2",
|
||||
"react-redux": "5.0.7",
|
||||
"redux": "4.0.0",
|
||||
"youtube-api-search": "0.0.5"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
export default class App extends Component {
|
||||
render() {
|
||||
return (
|
||||
<div>React simple starter</div>
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
import React, { Component } from 'react';
|
||||
|
||||
class SearchBar extends Component {
|
||||
render() {
|
||||
return <input />;
|
||||
}
|
||||
}
|
||||
|
||||
// Export file (import in another file)
|
||||
export default SearchBar;
|
27
src/index.js
27
src/index.js
|
@ -1,15 +1,22 @@
|
|||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { createStore, applyMiddleware } from 'redux';
|
||||
import SearchBar from './components/search_bar';
|
||||
|
||||
import App from './components/app';
|
||||
import reducers from './reducers';
|
||||
// Variable to hold the API key
|
||||
const API_KEY = 'AIzaSyCV3vu9eXY75w23VFYZOAp1V5Rqk4gTD5E';
|
||||
|
||||
const createStoreWithMiddleware = applyMiddleware()(createStore);
|
||||
// Create a new component. This component should produce
|
||||
// some HTML
|
||||
const App = () => {
|
||||
return (
|
||||
<div>
|
||||
<SearchBar />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
ReactDOM.render(
|
||||
<Provider store={createStoreWithMiddleware(reducers)}>
|
||||
<App />
|
||||
</Provider>
|
||||
, document.querySelector('.container'));
|
||||
// App = function() similar to App = () =>
|
||||
|
||||
// Take this component's generated HTML and
|
||||
// put it on the page (in the DOM)
|
||||
ReactDOM.render(<App />, document.querySelector('.container'));
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import { combineReducers } from 'redux';
|
||||
|
||||
const rootReducer = combineReducers({
|
||||
state: (state = {}) => state
|
||||
});
|
||||
|
||||
export default rootReducer;
|
|
@ -1,7 +1,7 @@
|
|||
import _$ from 'jquery';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import TestUtils from 'react-addons-test-utils';
|
||||
import TestUtils from 'react-dom/test-utils';
|
||||
import jsdom from 'jsdom';
|
||||
import chai, { expect } from 'chai';
|
||||
import chaiJquery from 'chai-jquery';
|
||||
|
|
|
@ -1,26 +1,30 @@
|
|||
module.exports = {
|
||||
entry: [
|
||||
'./src/index.js'
|
||||
],
|
||||
entry: ['./src/index.js'],
|
||||
output: {
|
||||
path: __dirname,
|
||||
publicPath: '/',
|
||||
filename: 'bundle.js'
|
||||
},
|
||||
module: {
|
||||
loaders: [{
|
||||
loaders: [
|
||||
{
|
||||
exclude: /node_modules/,
|
||||
loader: 'babel',
|
||||
query: {
|
||||
presets: ['react', 'es2015', 'stage-1']
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['', '.js', '.jsx']
|
||||
},
|
||||
devServer: {
|
||||
historyApiFallback: true,
|
||||
contentBase: './'
|
||||
contentBase: './',
|
||||
watchOptions: {
|
||||
aggregateTimeout: 300,
|
||||
poll: 1000
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue