Skip to content

Commit 78e156f

Browse files
committed
2 parents c4ee9b7 + 02dbdd0 commit 78e156f

File tree

13 files changed

+305
-202
lines changed

13 files changed

+305
-202
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ node_js:
55
before_script:
66
- npm install vue vue-template-compiler
77
script:
8+
- cp ./scripts/.npmrc.template $HOME/.npmrc
89
- COVERAGE=true npm run test
910
- npm run codecov
11+
- if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then npm run pub-with-ci; fi
1012
- bash ./scripts/deploy-to-gh-pages.sh
1113
env:
1214
matrix:

BACKERS.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<h1 align="center">Sponsors &amp; Backers</h1>
2+
3+
<br><br>
4+
5+
<h2 align="center">Sponsors</h2>
6+
<p align="center">
7+
<a href="https://www.patreon.com/tangjinzhou" target="_blank">
8+
虚位以待...
9+
</a>
10+
</p>
11+
12+
<h2 align="center">Backers</h2>
13+
<p align="center">
14+
<a href="https://www.patreon.com/tangjinzhou" target="_blank">
15+
虚位以待...
16+
</a>
17+
</p>
18+
19+
<h2 align="center">支付宝/微信</h2>
20+
21+
### 使用支付宝/微信的赞助的用户,如需要添加名单,赞助后可发github账号到邮箱([email protected])
22+
23+
- [fastgoo](https://github.com/fastgoo)
24+
- [sendya](https://github.com/sendya)
25+
- [limichange](https://github.com/limichange)
26+

CHANGELOG.en-US.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
---
44

5+
## 1.0.0
6+
7+
`2018-07-21`
8+
- 🌟 Add `Carousel` component [edddbd](https://github.com/vueComponent/ant-design/commit/edddbd982a279b62229ce825855c14c556866ece)
9+
- modify some error document
10+
511
## 0.7.1
612

713
`2018-07-17`

CHANGELOG.zh-CN.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
---
44

5+
## 1.0.0
6+
7+
`2018-07-21`
8+
- 🌟 新增`Carousel 走马灯`组件[edddbd](https://github.com/vueComponent/ant-design/commit/edddbd982a279b62229ce825855c14c556866ece)
9+
- 更正了若干文档错误
10+
511
## 0.7.1
612

713
`2018-07-17`

README-zh_CN.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@ Ant Design 3.X 的 Vue 实现,开发和服务于企业级后台产品。
2222

2323
[README in English](README.md)
2424

25+
## 赞助
26+
27+
vue-antd-ui是一个开源的独立项目,为了项目能够更好的持续的发展,我们期望获得你的支持,你可以通过如下任何一种方式支持我们:
28+
29+
- [Patreon](https://www.patreon.com/tangjinzhou)
30+
- [opencollective](https://opencollective.com/ant-design-278)
31+
- [paypal](https://www.paypal.me/tangjinzhou)
32+
33+
<p align="center">
34+
<img src="https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png">
35+
</p>
36+
2537
## 特性
2638

2739
- 提炼自企业级中后台产品的交互语言和视觉风格。

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ An enterprise-class UI components based on Ant Design 3.X and Vue.
2727
- A set of high-quality Vue components out of the box.
2828
- Shared [Ant Design of React](https://ant.design/docs/spec/introduce) design resources.
2929

30+
## Donation
31+
32+
vue-antd-ui is an open source independent project. In order to achieve better and sustainable development of the project, we hope to get your support. You can support us in any of the following ways:
33+
34+
- [Patreon](https://www.patreon.com/tangjinzhou)
35+
- [opencollective](https://opencollective.com/ant-design-278)
36+
- [paypal](https://www.paypal.me/tangjinzhou)
37+
38+
<p align="center">
39+
<img src="https://user-images.githubusercontent.com/6937879/43032487-932a5536-8cea-11e8-9175-9c006e938a82.png">
40+
</p>
3041

3142
## Using npm or yarn
3243

antd-tools/gulpfile.js

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const fs = require('fs')
2525
const rimraf = require('rimraf')
2626
const replaceLib = require('./replaceLib')
2727
const stripCode = require('gulp-strip-code')
28+
const compareVersions = require('compare-versions')
2829

2930
const cwd = process.cwd()
3031
const libDir = path.join(cwd, 'lib')
@@ -133,13 +134,15 @@ function compile (modules) {
133134
function tag () {
134135
console.log('tagging')
135136
const { version } = packageJson
137+
execSync(`git config --global user.email ${process.env.GITHUB_USER_EMAIL}`)
138+
execSync(`git config --global user.name ${process.env.GITHUB_USER_NAME}`)
136139
execSync(`git tag ${version}`)
137140
execSync(`git push origin ${version}:${version}`)
138141
execSync('git push origin master:master')
139142
console.log('tagged')
140143
}
141144

142-
function githubRelease () {
145+
function githubRelease (done) {
143146
const changlogFiles = [
144147
path.join(cwd, 'CHANGELOG.en-US.md'),
145148
path.join(cwd, 'CHANGELOG.zh-CN.md'),
@@ -173,13 +176,14 @@ function githubRelease () {
173176
const [_, owner, repo] = execSync('git remote get-url origin') // eslint-disable-line
174177
.toString()
175178
.match(/github.com[:/](.+)\/(.+)\.git/)
176-
177179
github.repos.createRelease({
178180
owner,
179181
repo,
180182
tag_name: version,
181183
name: version,
182184
body: changelog,
185+
}).then(() => {
186+
done()
183187
})
184188
}
185189
gulp.task('check-git', (done) => {
@@ -204,8 +208,9 @@ function publish (tagString, done) {
204208
const publishNpm = process.env.PUBLISH_NPM_CLI || 'npm'
205209
runCmd(publishNpm, args, (code) => {
206210
tag()
207-
githubRelease()
208-
done(code)
211+
githubRelease(() => {
212+
done(code)
213+
})
209214
})
210215
}
211216

@@ -261,6 +266,43 @@ gulp.task('pub', ['check-git', 'compile'], (done) => {
261266
}
262267
})
263268

269+
gulp.task('pub-with-ci', (done) => {
270+
if (!process.env.NPM_TOKEN) {
271+
console.log('no NPM token found, skip')
272+
} else {
273+
const github = new GitHub()
274+
github.authenticate({
275+
type: 'oauth',
276+
token: process.env.GITHUB_TOKEN,
277+
})
278+
const [_, owner, repo] = execSync('git remote get-url origin') // eslint-disable-line
279+
.toString()
280+
.match(/github.com[:/](.+)\/(.+)\.git/)
281+
const getLatestRelease = github.repos.getLatestRelease({
282+
owner,
283+
repo,
284+
})
285+
const getCommits = github.repos.getCommits({
286+
owner,
287+
repo,
288+
per_page: 1,
289+
})
290+
Promise.all([getLatestRelease, getCommits]).then(([latestRelease, commits]) => {
291+
const preVersion = latestRelease.data.tag_name
292+
const { version } = packageJson
293+
const [_, newVersion] = commits.data[0].commit.message.trim().match(/bump (.+)/) || []
294+
if (compareVersions(version, preVersion) === 1 && newVersion && newVersion.trim() === version) {
295+
gulp.run('pub', (err) => {
296+
err && console.log('err', err)
297+
done()
298+
})
299+
} else {
300+
console.log('donot need publish' + version)
301+
}
302+
})
303+
}
304+
})
305+
264306
function reportError () {
265307
console.log(chalk.bgRed('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'))
266308
console.log(chalk.bgRed('!! `npm publish` is forbidden for this package. !!'))

components/form/index.en-US.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,11 @@ After wrapped by `getFieldDecorator`, `value`(or other property defined by `valu
119119
| options.initialValue | You can specify initial value, type, optional value of children node. (Note: Because `Form` will test equality with `===` internaly, we recommend to use vairable as `initialValue`, instead of literal) | | n/a |
120120
| options.normalize | Normalize value to form component, [a select-all example](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - |
121121
| options.rules | Includes validation rules. Please refer to "Validation Rules" part for details. | object\[] | n/a |
122-
| options.trigger | When to collect the value of children node | string | 'onChange' |
122+
| options.trigger | When to collect the value of children node | string | 'change' |
123123
| options.validateFirst | Whether stop validate on first rule of error for this field. | boolean | false |
124-
| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'onChange' |
124+
| options.validateTrigger | When to validate the value of children node. | string\|string\[] | 'change' |
125125
| options.valuePropName | Props of children node, for example, the prop of Switch is 'checked'. | string | 'value' |
126126

127-
More option can be referenced at [rc-form option](https://github.com/react-component/form#option-object)
128-
129127
### Form.Item
130128

131129
Note:

components/form/index.zh-CN.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,11 @@ CustomizedForm = Form.create({})(CustomizedForm);
118118
| options.initialValue | 子节点的初始值,类型、可选值均由子节点决定(注意:由于内部校验时使用 `===` 判断是否变化,建议使用变量缓存所需设置的值而非直接使用字面量)) | | |
119119
| options.normalize | 转换默认的 value 给控件,[一个选择全部的例子](https://codesandbox.io/s/kw4l2vqqmv) | function(value, prevValue, allValues): any | - |
120120
| options.rules | 校验规则,参考下方文档 | object\[] | |
121-
| options.trigger | 收集子节点的值的时机 | string | 'onChange' |
121+
| options.trigger | 收集子节点的值的时机 | string | 'change' |
122122
| options.validateFirst | 当某一规则校验不通过时,是否停止剩下的规则的校验 | boolean | false |
123-
| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'onChange' |
123+
| options.validateTrigger | 校验子节点值的时机 | string\|string\[] | 'change' |
124124
| options.valuePropName | 子节点的值的属性,如 Switch 的是 'checked' | string | 'value' |
125125

126-
更多参数可参考 [rc-form option](https://github.com/react-component/form#option-object)
127-
128126
### Form.Item
129127

130128
注意:

0 commit comments

Comments
 (0)