mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-02-16 19:40:58 +03:00
Update to Babel 6
This commit is contained in:
parent
1752cccd82
commit
c66e352efe
4
.babelrc
4
.babelrc
|
@ -1,4 +1,4 @@
|
||||||
{
|
{
|
||||||
"stage": 0,
|
"plugins": ["transform-react-jsx"],
|
||||||
"loose": "all"
|
"presets": ["es2015", "stage-0"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"stage": 0
|
"plugins": ["transform-react-jsx"],
|
||||||
|
"presets": ["es2015", "stage-0"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,12 @@
|
||||||
"redux-thunk": "^1.0.0"
|
"redux-thunk": "^1.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^5.6.18",
|
"babel-cli": "^6.1.2",
|
||||||
"babel-loader": "^5.1.4",
|
"babel-core": "^6.1.2",
|
||||||
|
"babel-loader": "^6.0.1",
|
||||||
|
"babel-plugin-transform-react-jsx": "^6.0.18",
|
||||||
|
"babel-preset-es2015": "^6.1.2",
|
||||||
|
"babel-preset-stage-0": "^6.1.2",
|
||||||
"node-libs-browser": "^0.5.2",
|
"node-libs-browser": "^0.5.2",
|
||||||
"react-hot-loader": "^1.3.0",
|
"react-hot-loader": "^1.3.0",
|
||||||
"redux-devtools": "^3.0.0-beta-3",
|
"redux-devtools": "^3.0.0-beta-3",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { Component, PropTypes } from 'react';
|
import React, { Component, PropTypes } from 'react';
|
||||||
|
|
||||||
export default class Counter extends Component {
|
class Counter extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
increment: PropTypes.func.isRequired,
|
increment: PropTypes.func.isRequired,
|
||||||
incrementIfOdd: PropTypes.func.isRequired,
|
incrementIfOdd: PropTypes.func.isRequired,
|
||||||
|
@ -23,3 +23,5 @@ export default class Counter extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Counter;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
{
|
{
|
||||||
"stage": 0
|
"plugins": ["transform-react-jsx"],
|
||||||
|
"presets": ["es2015", "stage-0"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ const FILTER_TITLES = {
|
||||||
[SHOW_MARKED]: 'Completed'
|
[SHOW_MARKED]: 'Completed'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class Footer extends Component {
|
class Footer extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
markedCount: PropTypes.number.isRequired,
|
markedCount: PropTypes.number.isRequired,
|
||||||
unmarkedCount: PropTypes.number.isRequired,
|
unmarkedCount: PropTypes.number.isRequired,
|
||||||
|
@ -69,3 +69,5 @@ export default class Footer extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Footer;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { PropTypes, Component } from 'react';
|
import React, { PropTypes, Component } from 'react';
|
||||||
import TodoTextInput from './TodoTextInput';
|
import TodoTextInput from './TodoTextInput';
|
||||||
|
|
||||||
export default class Header extends Component {
|
class Header extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
addTodo: PropTypes.func.isRequired
|
addTodo: PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
@ -23,3 +23,5 @@ export default class Header extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default Header;
|
||||||
|
|
|
@ -9,7 +9,7 @@ const TODO_FILTERS = {
|
||||||
[SHOW_MARKED]: todo => todo.marked
|
[SHOW_MARKED]: todo => todo.marked
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class MainSection extends Component {
|
class MainSection extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
todos: PropTypes.array.isRequired,
|
todos: PropTypes.array.isRequired,
|
||||||
actions: PropTypes.object.isRequired
|
actions: PropTypes.object.isRequired
|
||||||
|
@ -82,3 +82,5 @@ export default class MainSection extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default MainSection;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { Component, PropTypes } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import TodoTextInput from './TodoTextInput';
|
import TodoTextInput from './TodoTextInput';
|
||||||
|
|
||||||
export default class TodoItem extends Component {
|
class TodoItem extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
todo: PropTypes.object.isRequired,
|
todo: PropTypes.object.isRequired,
|
||||||
editTodo: PropTypes.func.isRequired,
|
editTodo: PropTypes.func.isRequired,
|
||||||
|
@ -66,3 +66,5 @@ export default class TodoItem extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default TodoItem;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { Component, PropTypes } from 'react';
|
import React, { Component, PropTypes } from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
export default class TodoTextInput extends Component {
|
class TodoTextInput extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onSave: PropTypes.func.isRequired,
|
onSave: PropTypes.func.isRequired,
|
||||||
text: PropTypes.string,
|
text: PropTypes.string,
|
||||||
|
@ -53,3 +53,5 @@ export default class TodoTextInput extends Component {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default TodoTextInput;
|
||||||
|
|
|
@ -35,8 +35,12 @@
|
||||||
"redux": "^3.0.0"
|
"redux": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-core": "^5.6.18",
|
"babel-cli": "^6.1.2",
|
||||||
"babel-loader": "^5.1.4",
|
"babel-core": "^6.1.2",
|
||||||
|
"babel-loader": "^6.0.1",
|
||||||
|
"babel-plugin-transform-react-jsx": "^6.0.18",
|
||||||
|
"babel-preset-es2015": "^6.1.2",
|
||||||
|
"babel-preset-stage-0": "^6.1.2",
|
||||||
"node-libs-browser": "^0.5.2",
|
"node-libs-browser": "^0.5.2",
|
||||||
"raw-loader": "^0.5.1",
|
"raw-loader": "^0.5.1",
|
||||||
"react-hot-loader": "^1.3.0",
|
"react-hot-loader": "^1.3.0",
|
||||||
|
|
15
package.json
15
package.json
|
@ -7,8 +7,8 @@
|
||||||
"clean": "rimraf lib",
|
"clean": "rimraf lib",
|
||||||
"build": "babel src --out-dir lib",
|
"build": "babel src --out-dir lib",
|
||||||
"lint": "eslint src test examples",
|
"lint": "eslint src test examples",
|
||||||
"test": "NODE_ENV=test mocha --compilers js:babel/register --recursive",
|
"test": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive",
|
||||||
"test:watch": "NODE_ENV=test mocha --compilers js:babel/register --recursive --watch",
|
"test:watch": "NODE_ENV=test mocha --compilers js:babel-core/register --recursive --watch",
|
||||||
"test:cov": "babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive",
|
"test:cov": "babel-node ./node_modules/.bin/isparta cover ./node_modules/.bin/_mocha -- --recursive",
|
||||||
"prepublish": "npm run lint && npm run test && npm run clean && npm run build"
|
"prepublish": "npm run lint && npm run test && npm run clean && npm run build"
|
||||||
},
|
},
|
||||||
|
@ -31,10 +31,13 @@
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/gaearon/redux-devtools",
|
"homepage": "https://github.com/gaearon/redux-devtools",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel": "^5.5.8",
|
"babel-cli": "^6.1.2",
|
||||||
"babel-core": "^5.6.18",
|
"babel-core": "^6.1.2",
|
||||||
"babel-eslint": "^3.1.15",
|
"babel-eslint": "^4.1.4",
|
||||||
"babel-loader": "^5.1.4",
|
"babel-loader": "^6.0.1",
|
||||||
|
"babel-plugin-transform-react-jsx": "^6.0.18",
|
||||||
|
"babel-preset-es2015": "^6.1.2",
|
||||||
|
"babel-preset-stage-0": "^6.1.2",
|
||||||
"eslint": "^0.23",
|
"eslint": "^0.23",
|
||||||
"eslint-config-airbnb": "0.0.6",
|
"eslint-config-airbnb": "0.0.6",
|
||||||
"eslint-plugin-react": "^2.3.0",
|
"eslint-plugin-react": "^2.3.0",
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default function createDevTools(children) {
|
||||||
Monitor.reducer(state, action, monitorProps)
|
Monitor.reducer(state, action, monitorProps)
|
||||||
);
|
);
|
||||||
|
|
||||||
return class DevTools extends Component {
|
class DevTools extends Component {
|
||||||
static contextTypes = {
|
static contextTypes = {
|
||||||
store: PropTypes.object
|
store: PropTypes.object
|
||||||
};
|
};
|
||||||
|
@ -37,6 +37,7 @@ export default function createDevTools(children) {
|
||||||
store={this.liftedStore} />
|
store={this.liftedStore} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return DevTools;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user