Skip to content

Commit

Permalink
fix 0.9.3 error
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Nov 4, 2015
1 parent 39f8613 commit 5bcdcc3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

---

## 0.9.3 `2015-11-03`
## 0.9.4 `2015-11-04`

* 增加对 React 版本的检测机制,0.9.x 序列只能使用 [email protected].x
* 增加对 React 版本的检测提示机制,0.9.x 序列只能使用 `react@~0.13.3`

## 0.9.2 `2015-10-26`

Expand Down
17 changes: 8 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';

var React = require('react');
require('./style/index.less');

// matchMedia polyfill for
Expand All @@ -12,7 +11,7 @@ window.matchMedia = window.matchMedia || function() {
};
};

const antd = {
var antd = {
Affix: require('./components/affix'),
Datepicker: require('./components/datepicker'),
Tooltip: require('./components/tooltip'),
Expand Down Expand Up @@ -51,14 +50,14 @@ const antd = {
// deprecate antd.confirm
antd.confirm = require('util-deprecate')(antd.confirm, 'antd.confirm() is deprecated, use antd.Modal.confirm() instead');

antd.version = require('./package.json').version;

if (process.env.NODE_ENV !== 'production') {
const warning = require('warning');
const semver = require('semver');
const reactVersionInDeps = require('./package.json').devDependencies.react;
var warning = require('warning');
var semver = require('semver');
var reactVersionInDeps = '~0.13.3';
warning(semver.satisfies(React.version, reactVersionInDeps),
`antd@${antd.version} need to satisfies react@${reactVersionInDeps}.`);
`antd@${antd.version} need to satisfies react@${reactVersionInDeps} which is ${React.version} now.`);
}

module.exports = antd;

antd.version = require('./package.json').version;
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "antd",
"version": "0.9.3",
"stableVersion": "0.9.3",
"version": "0.9.4",
"stableVersion": "0.9.4",
"title": "Ant Design",
"description": "一个 UI 设计语言",
"homepage": "http://ant.design/",
Expand Down Expand Up @@ -101,7 +101,7 @@
"clean": "rm -rf _site dist",
"deploy": "rm -rf node_modules && node scripts/install.js && npm run just-deploy",
"just-deploy": "npm run clean && webpack && webpack --config webpack.config.min.js && NODE_ENV=PRODUCTION nico build && node scripts/deploy.js",
"lint": "eslint components index.js --ext '.js,.jsx'",
"lint": "eslint components --ext '.js,.jsx'",
"lesslint": "lesslint style",
"test": "webpack && npm run lint",
"pub": "sh ./scripts/publish.sh",
Expand Down

0 comments on commit 5bcdcc3

Please sign in to comment.