Skip to content

Commit

Permalink
Update dependencies and adding tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
supnate committed Nov 17, 2016
1 parent 1d2b1a1 commit 9f79788
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions bin/rekit.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ function done(pkgVersions) {
console.log('Enjoy!');
}

request('http://raw.githubusercontent.com/supnate/rekit-deps/master/deps.1.x.json', function (error, response, body) {
if (!error && response.statusCode == 200) {
request('http://raw.githubusercontent.com/supnate/rekit-deps/master/deps.1.1.x.json', function (error, response, body) {
if (!error && response.statusCode === 200) {
done(JSON.parse(body));
} else {
console.log('Network failure. Please check and retry.');
Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rekit",
"version": "1.0.6",
"version": "1.1.0",
"description": "Toolkit for building scalable web applications with React, Redux and React-router.",
"bin": {
"rekit": "./bin/rekit.js"
Expand Down Expand Up @@ -106,9 +106,9 @@
"trash": "^4.0.0"
},
"devDependencies": {
"babel-eslint": "^6.1.2",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.5",
"babel-plugin-istanbul": "^2.0.1",
"babel-plugin-istanbul": "^3.0.0",
"babel-plugin-lodash": "^3.2.8",
"babel-plugin-module-resolver": "^2.2.0",
"babel-preset-es2015": "^6.14.0",
Expand All @@ -117,14 +117,14 @@
"babel-register": "^6.14.0",
"chai": "^3.5.0",
"codecov": "^1.0.1",
"cross-env": "^2.0.1",
"css-loader": "^0.25.0",
"cross-env": "^3.1.3",
"css-loader": "^0.26.0",
"enzyme": "^2.4.1",
"eslint": "^3.5.0",
"eslint-config-airbnb": "^11.0.0",
"eslint-config-airbnb": "^13.0.0",
"eslint-import-resolver-babel-module": "^2.0.1",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^3.0.1",
"eslint-plugin-react": "^6.2.0",
"estraverse": "^4.2.0",
"estraverse-fb": "^1.3.1",
Expand All @@ -135,12 +135,11 @@
"less-loader": "^2.2.3",
"lodash-webpack-plugin": "^0.10.0",
"mocha": "^3.0.2",
"mocha-webpack": "^0.6.0",
"nock": "^8.0.0",
"mocha-webpack": "^0.7.0",
"nock": "^9.0.2",
"npm-run": "^4.1.0",
"nyc": "^8.1.0",
"nyc": "^9.0.1",
"react-addons-test-utils": "^15.3.1",
"react-hot-loader": "^1.3.0",
"redux-mock-store": "^1.2.0",
"sinon": "^1.17.5",
"url-loader": "^0.5.7",
Expand Down
2 changes: 1 addition & 1 deletion src/common/configStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function configureStore(initialState) {
applyMiddleware(...middlewares),
devToolsExtension
));

/* istanbul ignore if */
if (module.hot) {
// Enable Webpack hot module replacement for reducers
module.hot.accept('./rootReducer', () => {
Expand Down
1 change: 1 addition & 0 deletions src/containers/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import routeConfig from '../common/routeConfig';
export default class Root extends React.Component {
render() {
const { store, history } = this.props; // eslint-disable-line
/* istanbul ignore next */
if (!this.routeConfig) this.routeConfig = routeConfig;

return (
Expand Down
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ render(
);

// Hot Module Replacement API
/* istanbul ignore if */
if (module.hot) {
module.hot.accept('./containers/Root', () => {
const NextRoot = require('./containers/Root').default; // eslint-disable-line
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/add_component.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if (featureName) {
targetDir = path.join(helpers.getProjectRoot(), `src/features/${featureName}`);
}

if (shell.test('-e', path.join(targetDir, `${componentName}.*`))) {
if (shell.test('-e', path.join(targetDir, `${componentName}.js`))) {
console.log(`Error: Component has been existed: ${componentName}`);
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion tools/cli/add_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (!featureName || !pageName) {
pageName = _.upperFirst(_.camelCase(pageName));

const targetDir = path.join(helpers.getProjectRoot(), `src/features/${featureName}`);
if (shell.test('-e', path.join(targetDir, `${pageName}.*`))) {
if (shell.test('-e', path.join(targetDir, `${pageName}.js`))) {
console.log(`Error: Page has been existed: ${pageName}`);
process.exit(1);
}
Expand Down

0 comments on commit 9f79788

Please sign in to comment.