-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 872f8f5
Showing
14 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["react", "es2015", "stage-1"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/node_modules | ||
bundle.js | ||
npm-debug.log | ||
|
||
# IntelliJ | ||
*.iml | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# NinetyDays | ||
|
||
An application to get your fitness back on track | ||
|
||
###Getting Started### | ||
|
||
Fork this repo, clone it, and: | ||
|
||
```js | ||
> npm install | ||
> npm start | ||
``` | ||
|
||
Contributions welcome! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link rel="stylesheet" href="/style/style.css"> | ||
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css"> | ||
<script src="https://maps.googleapis.com/maps/api/js"></script> | ||
</head> | ||
<body> | ||
<div class="container"></div> | ||
</body> | ||
<script src="/bundle.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "redux-simple-starter", | ||
"version": "1.0.0", | ||
"description": "Simple starter package for Redux with React and Babel support", | ||
"main": "index.js", | ||
"repository": "[email protected]:StephenGrider/ReduxSimpleStarter.git", | ||
"scripts": { | ||
"start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js", | ||
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test", | ||
"test:watch": "npm run test -- --watch" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"babel-core": "^6.2.1", | ||
"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.0.0", | ||
"react-router": "^2.0.1", | ||
"redux": "^3.0.4" | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React, { Component } from 'react'; | ||
|
||
export default class App extends Component { | ||
render() { | ||
return ( | ||
<div>React simple starter</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import { Provider } from 'react-redux'; | ||
import { createStore, applyMiddleware } from 'redux'; | ||
|
||
import App from './components/app'; | ||
import reducers from './reducers'; | ||
|
||
const createStoreWithMiddleware = applyMiddleware()(createStore); | ||
|
||
ReactDOM.render( | ||
<Provider store={createStoreWithMiddleware(reducers)}> | ||
<App /> | ||
</Provider> | ||
, document.querySelector('.container')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { combineReducers } from 'redux'; | ||
|
||
const rootReducer = combineReducers({ | ||
state: (state = {}) => state | ||
}); | ||
|
||
export default rootReducer; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { renderComponent , expect } from '../test_helper'; | ||
import App from '../../src/components/app'; | ||
|
||
describe('App' , () => { | ||
let component; | ||
|
||
beforeEach(() => { | ||
component = renderComponent(App); | ||
}); | ||
|
||
it('renders something', () => { | ||
expect(component).to.exist; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import _$ from 'jquery'; | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import TestUtils from 'react-addons-test-utils'; | ||
import jsdom from 'jsdom'; | ||
import chai, { expect } from 'chai'; | ||
import chaiJquery from 'chai-jquery'; | ||
import { Provider } from 'react-redux'; | ||
import { createStore } from 'redux'; | ||
import reducers from '../src/reducers'; | ||
|
||
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>'); | ||
global.window = global.document.defaultView; | ||
global.navigator = global.window.navigator; | ||
const $ = _$(window); | ||
|
||
chaiJquery(chai, chai.util, $); | ||
|
||
function renderComponent(ComponentClass, props = {}, state = {}) { | ||
const componentInstance = TestUtils.renderIntoDocument( | ||
<Provider store={createStore(reducers, state)}> | ||
<ComponentClass {...props} /> | ||
</Provider> | ||
); | ||
|
||
return $(ReactDOM.findDOMNode(componentInstance)); | ||
} | ||
|
||
$.fn.simulate = function(eventName, value) { | ||
if (value) { | ||
this.val(value); | ||
} | ||
TestUtils.Simulate[eventName](this[0]); | ||
}; | ||
|
||
export {renderComponent, expect}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
entry: [ | ||
'./src/index.js' | ||
], | ||
output: { | ||
path: __dirname, | ||
publicPath: '/', | ||
filename: 'bundle.js' | ||
}, | ||
module: { | ||
loaders: [{ | ||
exclude: /node_modules/, | ||
loader: 'babel', | ||
query: { | ||
presets: ['react', 'es2015', 'stage-1'] | ||
} | ||
}] | ||
}, | ||
resolve: { | ||
extensions: ['', '.js', '.jsx'] | ||
}, | ||
devServer: { | ||
historyApiFallback: true, | ||
contentBase: './' | ||
} | ||
}; |