提交 5bcdcc3f 编写于 作者: A afc163

fix 0.9.3 error

上级 39f86133
......@@ -4,9 +4,9 @@
---
## 0.9.3 `2015-11-03`
## 0.9.4 `2015-11-04`
* 增加对 React 版本的检测机制,0.9.x 序列只能使用 react@0.13.x
* 增加对 React 版本的检测提示机制,0.9.x 序列只能使用 `react@~0.13.3`
## 0.9.2 `2015-10-26`
......
import React from 'react';
var React = require('react');
require('./style/index.less');
// matchMedia polyfill for
......@@ -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'),
......@@ -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;
{
"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/",
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册