From 1af735f5eb45c577b2bb768bcb2d02b94c2e86cd Mon Sep 17 00:00:00 2001 From: stephengrider Date: Mon, 30 Apr 2018 08:55:22 -0600 Subject: [PATCH] reorg --- LICENSE.MD | 21 --------------------- README.md | 25 ------------------------- index.html | 13 ------------- package.json | 37 ------------------------------------- src/actions/index.js | 0 src/components/app.js | 9 --------- src/index.js | 15 --------------- src/reducers/index.js | 7 ------- style/style.css | 0 test/components/app_test.js | 14 -------------- test/test_helper.js | 36 ------------------------------------ webpack.config.js | 26 -------------------------- 12 files changed, 203 deletions(-) delete mode 100644 LICENSE.MD delete mode 100644 README.md delete mode 100644 index.html delete mode 100644 package.json delete mode 100644 src/actions/index.js delete mode 100644 src/components/app.js delete mode 100644 src/index.js delete mode 100644 src/reducers/index.js delete mode 100644 style/style.css delete mode 100644 test/components/app_test.js delete mode 100644 test/test_helper.js delete mode 100644 webpack.config.js diff --git a/LICENSE.MD b/LICENSE.MD deleted file mode 100644 index 1148ff6..0000000 --- a/LICENSE.MD +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2016 Stephen Grider - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index ca60fdf..0000000 --- a/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# ReduxSimpleStarter - -Interested in learning [Redux](https://www.udemy.com/react-redux/)? - -### Getting Started - -There are two methods for getting started with this repo. - -#### Familiar with Git? -Checkout this repo, install dependencies, then start the gulp process with the following: - -``` -> git clone https://github.com/StephenGrider/ReduxSimpleStarter.git -> cd ReduxSimpleStarter -> npm install -> npm start -``` - -#### Not Familiar with Git? -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: - -``` -> npm install -> npm start -``` diff --git a/index.html b/index.html deleted file mode 100644 index c3452f2..0000000 --- a/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - -
- - - diff --git a/package.json b/package.json deleted file mode 100644 index 102a759..0000000 --- a/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "redux-simple-starter", - "version": "1.0.0", - "description": "Simple starter package for Redux with React and Babel support", - "main": "index.js", - "repository": "git@github.com: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.3.0", - "react-router": "^2.0.1", - "redux": "^3.0.4" - } -} diff --git a/src/actions/index.js b/src/actions/index.js deleted file mode 100644 index e69de29..0000000 diff --git a/src/components/app.js b/src/components/app.js deleted file mode 100644 index 58614b0..0000000 --- a/src/components/app.js +++ /dev/null @@ -1,9 +0,0 @@ -import React, { Component } from 'react'; - -export default class App extends Component { - render() { - return ( -
React simple starter
- ); - } -} diff --git a/src/index.js b/src/index.js deleted file mode 100644 index 69d577a..0000000 --- a/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -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( - - - - , document.querySelector('.container')); diff --git a/src/reducers/index.js b/src/reducers/index.js deleted file mode 100644 index d12506f..0000000 --- a/src/reducers/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import { combineReducers } from 'redux'; - -const rootReducer = combineReducers({ - state: (state = {}) => state -}); - -export default rootReducer; diff --git a/style/style.css b/style/style.css deleted file mode 100644 index e69de29..0000000 diff --git a/test/components/app_test.js b/test/components/app_test.js deleted file mode 100644 index d7a17a5..0000000 --- a/test/components/app_test.js +++ /dev/null @@ -1,14 +0,0 @@ -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; - }); -}); diff --git a/test/test_helper.js b/test/test_helper.js deleted file mode 100644 index e4d00a0..0000000 --- a/test/test_helper.js +++ /dev/null @@ -1,36 +0,0 @@ -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(''); -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( - - - - ); - - return $(ReactDOM.findDOMNode(componentInstance)); -} - -$.fn.simulate = function(eventName, value) { - if (value) { - this.val(value); - } - TestUtils.Simulate[eventName](this[0]); -}; - -export {renderComponent, expect}; diff --git a/webpack.config.js b/webpack.config.js deleted file mode 100644 index 31d865c..0000000 --- a/webpack.config.js +++ /dev/null @@ -1,26 +0,0 @@ -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: './' - } -};