Skip to content

Commit

Permalink
Removed unnecessary dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelquintanilha committed Jun 7, 2016
1 parent ba5d1b3 commit 77d6805
Show file tree
Hide file tree
Showing 19 changed files with 55 additions and 280 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -51,7 +51,7 @@
"react/no-did-update-set-state": 1,
"react/no-direct-mutation-state": 1,
"react/no-multi-comp": 1,
"react/no-set-state": 1,
"react/no-set-state": 0,
"react/no-unknown-property": 1,
"react/prefer-es6-class": 1,
"react/prop-types": 1,
Expand Down
7 changes: 7 additions & 0 deletions .npmignore
@@ -0,0 +1,7 @@
node_modules
src
tools
webpack.config.js
.babelrc
.editoconfig
.eslintrc
16 changes: 5 additions & 11 deletions package.json
@@ -1,31 +1,25 @@
{
"name": "react-linechart",
"version": "0.1",
"version": "1.0.0",
"description": "Highly customizable line chart with React",
"scripts": {
"prestart": "npm run remove-dist",
"start": "npm-run-all --parallel lint:tools test:watch open:src",
"open:src": "babel-node tools/srcServer.js",
"open:dist": "babel-node tools/distServer.js",
"lint:tools": "eslint webpack.config.js tools",
"clean-dist": "npm run remove-dist && mkdir dist",
"remove-dist": "node_modules/.bin/rimraf ./dist",
"build:html": "babel-node tools/buildHtml.js",
"build:js": "babel-node tools/build.js ",
"prebuild": "npm run clean-dist",
"build": "npm-run-all --parallel test build:html build:js",
"postbuild": "npm run open:dist",
"build": "npm-run-all --parallel test build:js",
"test": "cross-env NODE_ENV=test mocha --reporter progress --compilers js:babel-core/register --recursive \"./src/**/*.spec.js\" --require ignore-styles",
"test:watch": "npm run test -- --watch"
},
"author": "Rafael Quintanilha",
"license": "MIT",
"dependencies": {
"object-assign": "4.0.1",
"react": "0.14.7",
"react-dom": "0.14.7",
"react-redux": "4.4.0",
"redux": "3.3.1"
"react": "15.0.1",
"react-dom": "15.0.1"
},
"devDependencies": {
"babel-cli": "6.5.1",
Expand Down Expand Up @@ -57,7 +51,7 @@
"rimraf": "2.5.0",
"sass-loader": "3.1.2",
"style-loader": "0.13.0",
"webpack": "1.12.11",
"webpack": "1.13.1",
"webpack-dev-middleware": "1.4.0",
"webpack-hot-middleware": "2.6.0",
"yargs": "3.32.0"
Expand Down
22 changes: 8 additions & 14 deletions package.json~
@@ -1,7 +1,7 @@
{
"name": "simple-frontend-boilerplate",
"version": "1.0.0",
"description": "Simple boilerplate with React, Redux, Mocha, ESlint based on React Slinghsot",
"name": "react-linechart",
"version": "0.1",
"description": "Highly customizable line chart with React",
"scripts": {
"prestart": "npm run remove-dist",
"start": "npm-run-all --parallel lint:tools test:watch open:src",
Expand Down Expand Up @@ -66,19 +66,13 @@
"react",
"reactjs",
"react-router",
"hot",
"reload",
"hmr",
"live",
"edit",
"webpack",
"redux",
"flux",
"boilerplate",
"starter"
"d3",
"linechart",
"line-chart",
"chart"
],
"repository": {
"type": "git",
"url": "https://bitbucket.org/rafaelquintanilha/simple-frontend-boilerplate"
"url": "https://github.com/rafaelquintanilha/react-linechart"
}
}
6 changes: 0 additions & 6 deletions src/actions/actions.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/businessLogic/dateHelper.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/businessLogic/dateHelper.spec.js

This file was deleted.

58 changes: 0 additions & 58 deletions src/businessLogic/numberFormatter.js

This file was deleted.

36 changes: 0 additions & 36 deletions src/businessLogic/numberFormatter.spec.js

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/App.js → src/components/GreetingBox.js
@@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';

export default class App extends React.Component {
export default class GreetingBox extends React.Component {

handleChange(e) {
const value = e.target.value;
Expand All @@ -18,7 +18,7 @@ export default class App extends React.Component {
}
}

App.propTypes = {
GreetingBox.propTypes = {
greetingText: PropTypes.string.isRequired,
setGreetingText: PropTypes.func.isRequired
};
43 changes: 14 additions & 29 deletions src/containers/AppContainer.js
@@ -1,38 +1,23 @@
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import * as actions from '../actions/actions';
import App from '../components/App';
import React, { Component } from 'react';
import GreetingBox from '../components/GreetingBox';

class AppContainer extends Component {
class GreetingBoxComponent extends Component {

static propTypes = {
actions: PropTypes.object.isRequired,
state: PropTypes.object.isRequired
};
constructor(props) {
super(props);
this.state = { greetingText: "Hello, friend!" };
}

setGreetingText(text) {
this.setState({ greetingText: text });
}

render() {
const { greetingText } = this.props.state;
const { setGreetingText } = this.props.actions;
const { greetingText } = this.state;
return (
<App greetingText={greetingText} setGreetingText={setGreetingText} />
<GreetingBox greetingText={greetingText} setGreetingText={this.setGreetingText.bind(this)} />
);
}
}

function mapStateToProps(state) {
return {
state: state.reducer
};
}

function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators(actions, dispatch)
};
}

export default connect(
mapStateToProps,
mapDispatchToProps
)(AppContainer);
export default GreetingBoxComponent;
8 changes: 1 addition & 7 deletions src/index.js
@@ -1,15 +1,9 @@
import React from 'react';
import {render} from 'react-dom';
import { Provider } from 'react-redux';
import configureStore from './store/configureStore';
import AppContainer from './containers/AppContainer';

import './styles/styles.scss';

const store = configureStore();

render(
<Provider store={store}>
<AppContainer />
</Provider>, document.getElementById('app')
<AppContainer />, document.getElementById('app')
);
8 changes: 0 additions & 8 deletions src/reducers/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/reducers/reducer.js

This file was deleted.

24 changes: 0 additions & 24 deletions src/store/configureStore.dev.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/store/configureStore.js

This file was deleted.

6 changes: 0 additions & 6 deletions src/store/configureStore.prod.js

This file was deleted.

0 comments on commit 77d6805

Please sign in to comment.