commit 24b6a829dd2dcf42abcb75d0b194b1b8dd0e3b21
parent 35c04b77ca650d3258b59552325fe9aaf3bf78db
Author: Konstantin Tarkus <hello@tarkus.me>
Date: Thu, 18 Feb 2016 07:47:38 +0300
Update npm modules; small fixes
Diffstat:
6 files changed, 48 insertions(+), 51 deletions(-)
diff --git a/.jscsrc b/.jscsrc
@@ -1,5 +1,6 @@
{
"preset": "airbnb",
"excludeFiles": ["build/**", "node_modules/**"],
- "validateQuoteMarks": null
+ "validateQuoteMarks": null,
+ "disallowSpacesInsideTemplateStringPlaceholders": null
}
diff --git a/docs/react-style-guide.md b/docs/react-style-guide.md
@@ -125,9 +125,9 @@ import s from './Navigation.scss';
function Navigation() {
return (
- <nav className={[s.root, this.props.className]}>
+ <nav className={`${s.root} ${this.props.className}`}>
<ul className={s.items}>
- <li className={[s.item, s.selected]}>
+ <li className={`${s.item} ${s.selected}`}>
<a className={s.link} href="/products">Products</a>
</li>
<li className={s.item}>
diff --git a/package.json b/package.json
@@ -5,17 +5,17 @@
"npm": ">=3.3 <4"
},
"dependencies": {
- "babel-polyfill": "^6.3.14",
- "babel-runtime": "^6.3.19",
- "bluebird": "3.1.5",
+ "babel-polyfill": "^6.5.0",
+ "babel-runtime": "^6.5.0",
+ "bluebird": "3.3.1",
"classnames": "2.2.3",
"eventemitter3": "1.1.1",
"express": "4.13.4",
"fastclick": "1.0.6",
- "fbjs": "0.7.0",
- "front-matter": "2.0.5",
- "history": "2.0.0-rc2",
- "isomorphic-style-loader": "0.0.8",
+ "fbjs": "0.7.2",
+ "front-matter": "2.0.6",
+ "history": "2.0.0",
+ "isomorphic-style-loader": "0.0.10",
"jade": "1.11.0",
"node-fetch": "1.3.3",
"normalize.css": "3.0.3",
@@ -26,47 +26,47 @@
"whatwg-fetch": "0.11.0"
},
"devDependencies": {
- "assets-webpack-plugin": "^3.2.0",
- "autoprefixer": "^6.3.1",
- "babel-cli": "^6.4.5",
- "babel-eslint": "^5.0.0-beta6",
- "babel-loader": "^6.2.1",
+ "assets-webpack-plugin": "^3.3.0",
+ "autoprefixer": "^6.3.3",
+ "babel-cli": "^6.5.1",
+ "babel-eslint": "^5.0.0",
+ "babel-loader": "^6.2.3",
"babel-plugin-react-transform": "^2.0.0",
- "babel-plugin-transform-runtime": "^6.4.3",
- "babel-preset-es2015": "^6.3.13",
- "babel-preset-react": "^6.3.13",
- "babel-preset-stage-0": "^6.3.13",
+ "babel-plugin-transform-runtime": "^6.5.2",
+ "babel-preset-es2015": "^6.5.0",
+ "babel-preset-react": "^6.5.0",
+ "babel-preset-stage-0": "^6.5.0",
"browser-sync": "^2.11.1",
"css-loader": "^0.23.1",
"csscomb": "^3.1.8",
"del": "^2.2.0",
"eslint": "^1.10.3",
- "eslint-config-airbnb": "^4.0.0",
- "eslint-loader": "^1.2.0",
- "eslint-plugin-react": "^3.15.0",
+ "eslint-config-airbnb": "^5.0.1",
+ "eslint-loader": "^1.3.0",
+ "eslint-plugin-react": "^3.16.1",
"extend": "^3.0.0",
"file-loader": "^0.8.5",
"gaze": "^0.5.2",
"git-repository": "^0.1.1",
- "glob": "^6.0.4",
+ "glob": "^7.0.0",
"jest-cli": "^0.8.2",
- "jscs": "^2.8.0",
+ "jscs": "^2.10.1",
"json-loader": "^0.5.4",
"mkdirp": "^0.5.1",
"ncp": "^2.0.0",
- "postcss": "^5.0.14",
+ "postcss": "^5.0.16",
"postcss-import": "^8.0.2",
- "postcss-loader": "^0.8.0",
- "postcss-scss": "^0.1.3",
+ "postcss-loader": "^0.8.1",
+ "postcss-scss": "^0.1.5",
"precss": "^1.4.0",
"raw-loader": "^0.5.1",
- "react-transform-catch-errors": "^1.0.1",
- "react-transform-hmr": "^1.0.1",
- "redbox-react": "^1.2.0",
+ "react-transform-catch-errors": "^1.0.2",
+ "react-transform-hmr": "^1.0.2",
+ "redbox-react": "^1.2.2",
"replace": "^0.3.0",
"url-loader": "^0.5.7",
- "webpack": "^1.12.11",
- "webpack-hot-middleware": "^2.6.0",
+ "webpack": "^1.12.13",
+ "webpack-hot-middleware": "^2.7.1",
"webpack-middleware": "^1.4.0"
},
"jest": {
@@ -78,7 +78,7 @@
]
},
"scripts": {
- "lint": "eslint src tools && jscs src tools",
+ "lint": "eslint src tools && jscs src tools --verbose",
"csslint": "csscomb src/components --lint --verbose",
"csscomb": "csscomb src/components --verbose",
"test": "eslint src && jest",
diff --git a/src/components/Feedback/Feedback.js b/src/components/Feedback/Feedback.js
@@ -17,9 +17,15 @@ class Feedback extends Component {
return (
<div className={s.root}>
<div className={s.container}>
- <a className={s.link} href="https://gitter.im/kriasoft/react-starter-kit">Ask a question</a>
+ <a
+ className={s.link}
+ href="https://gitter.im/kriasoft/react-starter-kit"
+ >Ask a question</a>
<span className={s.spacer}>|</span>
- <a className={s.link} href="https://github.com/kriasoft/react-starter-kit/issues/new">Report an issue</a>
+ <a
+ className={s.link}
+ href="https://github.com/kriasoft/react-starter-kit/issues/new"
+ >Report an issue</a>
</div>
</div>
);
diff --git a/src/components/Link/Link.js b/src/components/Link/Link.js
@@ -8,7 +8,6 @@
*/
import React, { Component, PropTypes } from 'react';
-import parsePath from 'history/lib/parsePath';
import Location from '../../core/Location';
function isLeftClickEvent(event) {
@@ -22,9 +21,7 @@ function isModifiedEvent(event) {
class Link extends Component {
static propTypes = {
- to: PropTypes.string.isRequired,
- query: PropTypes.object,
- state: PropTypes.object,
+ to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,
onClick: PropTypes.func,
};
@@ -49,23 +46,16 @@ class Link extends Component {
if (allowTransition) {
const link = event.currentTarget;
if (this.props && this.props.to) {
- Location.push({
- ...(parsePath(this.props.to)),
- state: this.props && this.props.state || null,
- });
+ Location.push(this.props.to);
} else {
- Location.push({
- pathname: link.pathname,
- search: link.search,
- state: this.props && this.props.state || null,
- });
+ Location.push({ pathname: link.pathname, search: link.search });
}
}
};
render() {
- const { to, query, ...props } = this.props;
- return <a href={Location.createHref(to, query)} {...props} onClick={this.handleClick} />;
+ const { to, ...props } = this.props;
+ return <a href={Location.createHref(to)} {...props} onClick={this.handleClick} />;
}
}
diff --git a/tools/deploy.js b/tools/deploy.js
@@ -14,7 +14,7 @@ import fetch from './lib/fetch';
// TODO: Update deployment URL
// For more information visit http://gitolite.com/deploy.html
const getRemote = (slot) => ({
- name: slot ? slot : 'production',
+ name: slot || 'production',
url: `https://example${slot ? `-${slot}` : ''}.scm.azurewebsites.net:443/example.git`,
website: `http://example${slot ? `-${slot}` : ''}.azurewebsites.net`,
});