From e02d77b3df954416d900a4f49d7a4912cd89af30 Mon Sep 17 00:00:00 2001 From: Meck Date: Mon, 7 Nov 2016 11:48:28 +0800 Subject: [PATCH 1/3] Styles should be exported as well. --- index.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/index.js b/index.js index 94017e32ba..e43cee1955 100644 --- a/index.js +++ b/index.js @@ -1 +1,31 @@ +/* eslint no-console:0 */ +// this file is not used if use https://github.com/ant-design/babel-plugin-import + +function camelCase(name) { + return name.charAt(0).toUpperCase() + + name.slice(1).replace(/-(\w)/g, (m, n) => { + return n.toUpperCase(); + }); +} + +const req = require.context('./components', true, /^\.\/[^_][\w-]+\/(style\/)index\.tsx?$/); + +console.log(req.keys()); + +req.keys().forEach((mod) => { + let v = req(mod); + if (v && v.default) { + v = v.default; + } + const match = mod.match(/^\.\/([^_][\w-]+)\/index\.tsx?$/); + if (match && match[1]) { + if (match[1] === 'message' || match[1] === 'notification') { + // message & notification should not be capitalized + exports[match[1]] = v; + } else { + exports[camelCase(match[1])] = v; + } + } +}); + module.exports = require('./components'); From 446315faf4c271900766d9f070bd8e0398efc597 Mon Sep 17 00:00:00 2001 From: Meck Date: Mon, 7 Nov 2016 11:58:31 +0800 Subject: [PATCH 2/3] 2.3.1 CHANGELOG --- CHANGELOG.en-US.md | 6 ++++++ CHANGELOG.zh-CN.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/CHANGELOG.en-US.md b/CHANGELOG.en-US.md index dc4949356d..c87eadcb69 100644 --- a/CHANGELOG.en-US.md +++ b/CHANGELOG.en-US.md @@ -9,6 +9,12 @@ If you want to read change logs before `2.0.0`, please visit [GitHub](https://gi --- +## 2.3.1 + +`2016-11-07` + +* Add missing `dist/antd.css` back. + ## 2.3.0 `2016-11-04` diff --git a/CHANGELOG.zh-CN.md b/CHANGELOG.zh-CN.md index 51f447e713..5944ba1df0 100644 --- a/CHANGELOG.zh-CN.md +++ b/CHANGELOG.zh-CN.md @@ -9,6 +9,12 @@ timeline: true --- +## 2.3.1 + +`2016-11-07` + +* 修正上个版本缺少 `dist/antd.css` 的问题。 + ## 2.3.0 `2016-11-04` From 449a982f927b60ea040aca4992276ec9edc3b070 Mon Sep 17 00:00:00 2001 From: Meck Date: Mon, 7 Nov 2016 11:55:19 +0800 Subject: [PATCH 3/3] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c25b379f2c..de3c0699b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "antd", - "version": "2.3.0", + "version": "2.3.1", "title": "Ant Design", "description": "An enterprise-class UI design language and React-based implementation", "homepage": "http://ant.design/",