From b685a31f96f146822005f86f2164888c5f1169f8 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Mon, 11 Apr 2016 10:12:48 +0800 Subject: [PATCH] site: update dependencies --- package.json | 2 +- site/component/Article/ImagePreview.jsx | 2 +- site/component/Article/index.jsx | 2 +- site/component/ComponentDoc/index.jsx | 2 +- site/component/Footer/index.jsx | 2 +- site/component/Header/index.jsx | 2 +- site/component/Home/Banner.jsx | 2 +- site/component/Home/Page1.jsx | 2 +- site/component/Home/Page2.jsx | 2 +- site/component/Home/Page3.jsx | 2 +- site/component/IconSet/CopyableIcon.jsx | 2 +- site/component/MainContent/index.jsx | 2 +- site/component/utils.js | 6 +++--- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 282da820c6..2149488e50 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "gh-pages": "^0.11.0", "history": "^2.0.1", "jest-cli": "^0.10.0", - "jsonml-to-react-component": "~0.1.0", + "jsonml-to-react-component": "~0.2.0", "jsonml.js": "^0.1.0", "jsonp": "^0.2.0", "lesshint": "^1.2.1", diff --git a/site/component/Article/ImagePreview.jsx b/site/component/Article/ImagePreview.jsx index 90454b344d..85650c315a 100644 --- a/site/component/Article/ImagePreview.jsx +++ b/site/component/Article/ImagePreview.jsx @@ -1,6 +1,6 @@ import React from 'react'; import classNames from 'classnames'; -import { Modal, Carousel } from '../../../'; +import { Modal, Carousel } from 'antd'; function isGood(className) { return /\bgood\b/i.test(className); diff --git a/site/component/Article/index.jsx b/site/component/Article/index.jsx index d086fa9c7c..7ff6eabce5 100644 --- a/site/component/Article/index.jsx +++ b/site/component/Article/index.jsx @@ -48,7 +48,7 @@ export default class Article extends React.Component { return (
  • - {toReactComponent([], node[1])} + {toReactComponent(node[1])}
  • ); diff --git a/site/component/ComponentDoc/index.jsx b/site/component/ComponentDoc/index.jsx index 6c589c4e8b..07a2ca5007 100644 --- a/site/component/ComponentDoc/index.jsx +++ b/site/component/ComponentDoc/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Link } from 'react-router'; import classNames from 'classnames'; -import { Row, Col, Icon, Affix } from '../../../'; +import { Row, Col, Icon, Affix } from 'antd'; import Demo from '../Demo'; import * as utils from '../utils'; import demosList from '../../../_data/demos-list'; diff --git a/site/component/Footer/index.jsx b/site/component/Footer/index.jsx index dd92fa3eef..c9eafb9880 100644 --- a/site/component/Footer/index.jsx +++ b/site/component/Footer/index.jsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Select } from '../../../'; +import { Select } from 'antd'; import { version as antdVersion } from '../../../package.json'; import { docVersions } from '../../website.config'; const Option = Select.Option; diff --git a/site/component/Header/index.jsx b/site/component/Header/index.jsx index 15d9c6fd01..974c2183df 100644 --- a/site/component/Header/index.jsx +++ b/site/component/Header/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Link } from 'react-router'; import enquire from 'enquire.js'; -import { Select, Menu, Row, Col, Icon } from '../../../'; +import { Select, Menu, Row, Col, Icon } from 'antd'; const Option = Select.Option; import './index.less'; diff --git a/site/component/Home/Banner.jsx b/site/component/Home/Banner.jsx index f378ffb671..62220b0adf 100644 --- a/site/component/Home/Banner.jsx +++ b/site/component/Home/Banner.jsx @@ -4,7 +4,7 @@ import ScrollElement from 'rc-scroll-anim/lib/ScrollElement'; import TweenOne from 'rc-tween-one'; import GitHubButton from 'react-github-button'; import 'react-github-button/assets/style.css'; -import { Icon } from '../../../'; +import { Icon } from 'antd'; import QueueAnim from 'rc-queue-anim'; export default class Banner extends React.Component { diff --git a/site/component/Home/Page1.jsx b/site/component/Home/Page1.jsx index 1454a84d67..c618820d7a 100644 --- a/site/component/Home/Page1.jsx +++ b/site/component/Home/Page1.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { Link } from 'react-router'; import TweenOne from 'rc-tween-one'; import ScrollOverPack from 'rc-scroll-anim/lib/ScrollOverPack'; -import { Icon, Button } from '../../../'; +import { Icon, Button } from 'antd'; import QueueAnim from 'rc-queue-anim'; const clientHeight = document.documentElement.clientHeight; diff --git a/site/component/Home/Page2.jsx b/site/component/Home/Page2.jsx index 7cf463c81f..987da6d726 100644 --- a/site/component/Home/Page2.jsx +++ b/site/component/Home/Page2.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { Link } from 'react-router'; import TweenOne from 'rc-tween-one'; import ScrollOverPack from 'rc-scroll-anim/lib/ScrollOverPack'; -import { Icon, Button } from '../../../'; +import { Icon, Button } from 'antd'; import QueueAnim from 'rc-queue-anim'; export default class Page2 extends React.Component { diff --git a/site/component/Home/Page3.jsx b/site/component/Home/Page3.jsx index bf715bcade..7ebddc9ba0 100644 --- a/site/component/Home/Page3.jsx +++ b/site/component/Home/Page3.jsx @@ -2,7 +2,7 @@ import React from 'react'; import { Link } from 'react-router'; import TweenOne from 'rc-tween-one'; import ScrollOverPack from 'rc-scroll-anim/lib/ScrollOverPack'; -import { Icon, Button } from '../../../'; +import { Icon, Button } from 'antd'; import QueueAnim from 'rc-queue-anim'; export default class Page3 extends React.Component { diff --git a/site/component/IconSet/CopyableIcon.jsx b/site/component/IconSet/CopyableIcon.jsx index f239568e6f..8b42e37719 100644 --- a/site/component/IconSet/CopyableIcon.jsx +++ b/site/component/IconSet/CopyableIcon.jsx @@ -1,6 +1,6 @@ import React from 'react'; import CopyToClipboard from 'react-copy-to-clipboard'; -import { Icon } from '../../../'; +import { Icon } from 'antd'; export default class CopyableIcon extends React.Component { constructor(props) { diff --git a/site/component/MainContent/index.jsx b/site/component/MainContent/index.jsx index 67e8ca97be..656d7483eb 100644 --- a/site/component/MainContent/index.jsx +++ b/site/component/MainContent/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; import { Link } from 'react-router'; import scrollIntoView from 'dom-scroll-into-view'; -import { Row, Col, Menu } from '../../../'; +import { Row, Col, Menu } from 'antd'; import config from '../../website.config'; const SubMenu = Menu.SubMenu; diff --git a/site/component/utils.js b/site/component/utils.js index 007521c8ba..b40ff2bf64 100644 --- a/site/component/utils.js +++ b/site/component/utils.js @@ -9,7 +9,7 @@ function isHeading(type) { } export function jsonmlToComponent(pathname, jsonml) { - return toReactComponent([ + return toReactComponent(jsonml, [ [(node) => React.isValidElement(node), (node, index) => { return React.cloneElement(node, { key: index }); }], @@ -23,11 +23,11 @@ export function jsonmlToComponent(pathname, jsonml) { id: children, ...getAttributes(node), }, [ - { children.map(toReactComponent.bind(null, [])) }, + { children.map((child) => toReactComponent(child)) }, #, ]); }], - ], jsonml); + ]); } export function setTitle(title) {