diff --git a/bin/rekit.js b/bin/rekit.js index 4bb4bdd2..94610f3c 100755 --- a/bin/rekit.js +++ b/bin/rekit.js @@ -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.'); diff --git a/package.json b/package.json index d953ba09..4d9d8cdb 100644 --- a/package.json +++ b/package.json @@ -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" @@ -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", @@ -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", @@ -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", diff --git a/src/common/configStore.js b/src/common/configStore.js index 109028cc..102c0557 100644 --- a/src/common/configStore.js +++ b/src/common/configStore.js @@ -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', () => { diff --git a/src/containers/Root.js b/src/containers/Root.js index bf06120b..3b824ad6 100644 --- a/src/containers/Root.js +++ b/src/containers/Root.js @@ -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 ( diff --git a/src/index.js b/src/index.js index 3db5db92..7dcddf8f 100644 --- a/src/index.js +++ b/src/index.js @@ -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 diff --git a/tools/cli/add_component.js b/tools/cli/add_component.js index e289bb45..b01be524 100644 --- a/tools/cli/add_component.js +++ b/tools/cli/add_component.js @@ -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); } diff --git a/tools/cli/add_page.js b/tools/cli/add_page.js index 12ec3a3e..2581546b 100644 --- a/tools/cli/add_page.js +++ b/tools/cli/add_page.js @@ -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); }