Skip to content

[pull] next from vueComponent:next #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 835 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
835 commits
Select commit Hold shift + click to select a range
6c28a8e
fix: formItem error explain style #5004
tangjinzhou Dec 10, 2021
7d7f0f3
feat: input & textarea support lazy dir #4951
tangjinzhou Dec 10, 2021
7bc9c78
fix: trigger animate #5008
tangjinzhou Dec 11, 2021
d9cd6f2
fix: slider tooltip hide error
tangjinzhou Dec 11, 2021
bcc5ca4
test: update snap
tangjinzhou Dec 11, 2021
6e5390c
doc: add version info
tangjinzhou Dec 11, 2021
9c0464d
perf: layout
tangjinzhou Dec 11, 2021
0f833cb
fix: trigger multipe click #5002
tangjinzhou Dec 11, 2021
c685b46
test: update snap
tangjinzhou Dec 11, 2021
8eb43a4
fix: table ts type #5009
tangjinzhou Dec 12, 2021
9d469fb
perf: layout
tangjinzhou Dec 12, 2021
b9ff4ea
fix: ssr error
tangjinzhou Dec 12, 2021
4204ff0
test: update typography test
tangjinzhou Dec 12, 2021
07ee749
release 3.0.0-alpha.15
tangjinzhou Dec 12, 2021
cd6c6ff
fix(rate): global prefixCls invalid (#5026)
zkwolf Dec 13, 2021
7ec6831
refactor: input
tangjinzhou Dec 14, 2021
5543ce6
refactor: input
tangjinzhou Dec 15, 2021
296a2e5
refactor: input
tangjinzhou Dec 15, 2021
0ee974a
fix: input type
tangjinzhou Dec 15, 2021
883d6e2
fix: menu custom class, close #5038
tangjinzhou Dec 15, 2021
9791231
test: update snap
tangjinzhou Dec 15, 2021
af2e268
fix: carousel touch warning, close #5040
tangjinzhou Dec 15, 2021
31c8339
fix: remove textarea maxlength support emoji
tangjinzhou Dec 16, 2021
66eb020
fix: input textarea cursor pos error
tangjinzhou Dec 16, 2021
18cc95f
fix: table warning for page, close #5029
tangjinzhou Dec 16, 2021
2c2c070
perf: ts type, close #5044
tangjinzhou Dec 16, 2021
06516ec
fix: input earch icon
tangjinzhou Dec 16, 2021
9784b42
refactor: upload types, close #5047
tangjinzhou Dec 17, 2021
ae9ab9c
test: update transition #5023
tangjinzhou Dec 17, 2021
4706675
test: update transition #5023
tangjinzhou Dec 17, 2021
46b2162
fix: cannot select when use custom prefixCls #5023
tangjinzhou Dec 17, 2021
79ea891
doc: vite-plugin-components has been renamed to unplugin-vue-componen…
liweijie0812 Dec 17, 2021
443640e
feat: customCell add column arg, close #5052
tangjinzhou Dec 17, 2021
a3799fb
doc: update readme
tangjinzhou Dec 17, 2021
b02af56
fix: spin cause table pagination animation#5028
tangjinzhou Dec 18, 2021
ebd52af
refactor: form input css
tangjinzhou Dec 18, 2021
b77ca0e
release 3.0.0-alpha.16
tangjinzhou Dec 19, 2021
257f7f0
refactor: raf
tangjinzhou Dec 19, 2021
384ea35
test: update slider update
tangjinzhou Dec 19, 2021
2a47de6
refactor: input-number
tangjinzhou Dec 19, 2021
246e116
refactor: input-number
tangjinzhou Dec 20, 2021
5cc1bd7
refactor: input-number
tangjinzhou Dec 20, 2021
02e6fec
fix: tabs not update, close #5056
tangjinzhou Dec 20, 2021
8943595
feat: tabs overflow node support remove
tangjinzhou Dec 20, 2021
cbbf9f8
docs: modify typos in migration v3 (#5057)
liuxiaojiu Dec 20, 2021
72f8277
feat: export formInstance type
tangjinzhou Dec 21, 2021
1c9cfd1
Merge commit 'cbbf9f8f' into next
tangjinzhou Dec 21, 2021
7aae6f6
doc: form add demo (#5070)
tangjinzhou Dec 23, 2021
4e70c6d
perf: virtual list
tangjinzhou Dec 23, 2021
b6c1b3e
fix: tree render perf, close #5069
tangjinzhou Dec 24, 2021
3ff4f6b
fix: web-type.json lose, close #4860
tangjinzhou Dec 24, 2021
b645f82
fix: tabpane name error
tangjinzhou Dec 24, 2021
73ebf4c
feat: add global types for volar, close #5067
tangjinzhou Dec 24, 2021
e9c9fba
test: update test
tangjinzhou Dec 24, 2021
47f1bb0
test: update snap
tangjinzhou Dec 24, 2021
9cfeace
test: update test
tangjinzhou Dec 24, 2021
c6ab969
doc: update api
tangjinzhou Dec 24, 2021
3791cfc
release 3.0.0-beta.1
tangjinzhou Dec 24, 2021
8526a7e
doc: udapte changelog
tangjinzhou Dec 24, 2021
862a2b3
doc: udapte changelog
tangjinzhou Dec 24, 2021
8beb37f
chore: remove deep-assign (#5079)
zkwolf Dec 26, 2021
0bc1e0a
fix(form-item): should not validate when not have name (#5081)
zkwolf Dec 27, 2021
b265d75
fix: table first render width, close #5075 #4993
tangjinzhou Dec 27, 2021
8b2b402
release 3.0.0-beta.2
tangjinzhou Dec 27, 2021
e1613fa
fix: select not scroll, close #5082
tangjinzhou Dec 27, 2021
41f4187
release 3.0.0-beta.3
tangjinzhou Dec 27, 2021
30bbd4c
fix: inputnumber can not input min value, close #5083
tangjinzhou Dec 27, 2021
620214d
docs: remove app.config.productionTip (#5084)
palmcivet Dec 27, 2021
26496ba
refactor: checkbox (#5091)
tangjinzhou Dec 28, 2021
ca2ad60
fix: input type ts
tangjinzhou Dec 28, 2021
ed37400
feat: form add noStyle
tangjinzhou Dec 28, 2021
3c0979c
doc: add form demo
tangjinzhou Dec 28, 2021
2213d0e
release 3.0.0-beta.4
tangjinzhou Dec 28, 2021
f6725f8
docs: add @formily/antdv link (#5092)
zhouxinyong Dec 28, 2021
1d33c51
docs: fix typos and uniform punctuation in migration v3 (#5098)
yangzheli Dec 30, 2021
8a3724f
docs(carousel): customArrows.vue zindex misspelled (#5099)
irinify Dec 30, 2021
ad76bb6
refactor: message & notification (#5113)
tangjinzhou Jan 1, 2022
b13756f
fix: time-picker type error #5109
tangjinzhou Jan 1, 2022
d71df4b
fix: component ts type
tangjinzhou Jan 3, 2022
5b20498
fix: component ts type
tangjinzhou Jan 3, 2022
3fc7a05
fix: component ts build error
tangjinzhou Jan 3, 2022
5c90cc2
fix: space size=0 not work, close #5101
tangjinzhou Jan 4, 2022
81ab68f
release 3.0.0-beta.5
tangjinzhou Jan 4, 2022
3e8959a
fix: dropdown menu log warning, close #5127
tangjinzhou Jan 6, 2022
efa045a
doc: fix select range time issue, close #5125
tangjinzhou Jan 6, 2022
0a5dbf3
fix: virtual scrollBar not update, close #5124
tangjinzhou Jan 6, 2022
ab2df12
doc: update document title, close #5121
tangjinzhou Jan 6, 2022
98755f3
refactor: modal (#5129), close #5096
tangjinzhou Jan 6, 2022
dd0b0b2
feat: date-picker support vshow, close #5132
tangjinzhou Jan 7, 2022
615d7c7
doc: fix empty demo, close #5136
tangjinzhou Jan 7, 2022
7c9c95c
release 3.0.0-beta.6
tangjinzhou Jan 7, 2022
8013592
doc: update doc
tangjinzhou Jan 7, 2022
3297f7a
fix: modal esc not work
tangjinzhou Jan 7, 2022
7dda6e8
feat: update ts type
tangjinzhou Jan 9, 2022
23f5fba
feat: add formItemInstance type
tangjinzhou Jan 10, 2022
3d3dcd5
test: update snap
tangjinzhou Jan 10, 2022
f6d1b84
fix: modal cannot open in dropdown, close #5139
tangjinzhou Jan 10, 2022
dab6f90
release 3.0.0-beta.7
tangjinzhou Jan 10, 2022
9693e4b
fix:(modal): getContainer property invalid (#5147)
menghany Jan 11, 2022
b25c5cc
fix: ts type error
tangjinzhou Jan 11, 2022
ce767f2
doc: update demo ts type
tangjinzhou Jan 11, 2022
b62c156
feat: add some type export
tangjinzhou Jan 12, 2022
239354e
fix: modal getContainer not work
tangjinzhou Jan 12, 2022
10fed70
doc: update demo ts error
tangjinzhou Jan 12, 2022
26f1b98
feat: summary cell support inheritAttrs
tangjinzhou Jan 14, 2022
62428b6
fix(table): responsive invalid (#5172)
zkwolf Jan 17, 2022
7624d80
doc: add usage for vite (#5176), close #5169
smallp Jan 18, 2022
f0385d7
Refactor cascader (#5192)
tangjinzhou Jan 21, 2022
ab79b4b
fix: tabs control mode not work, close #5180
tangjinzhou Jan 21, 2022
b88d97a
release 3.0.0-beta.8
tangjinzhou Jan 21, 2022
1d47959
doc: update tabs demo
tangjinzhou Jan 21, 2022
1418422
fix: input focus style error, close #5188
tangjinzhou Jan 22, 2022
41fe8be
perf: mobile scroll, close #5191
tangjinzhou Jan 22, 2022
3d2a80b
doc: add dropdownVisibleChange, close #5195
tangjinzhou Jan 22, 2022
ae4085f
style: remove not use file
tangjinzhou Jan 23, 2022
7657157
style: remove not use file
tangjinzhou Jan 23, 2022
d442db0
refactor: wave
tangjinzhou Jan 23, 2022
6d4248d
fix: drag treenode style
tangjinzhou Jan 23, 2022
4846bd0
docs: update menu doc, add triggerSubMenuAction description (#5202)
chaegumi Jan 25, 2022
95ce5f4
doc: update doc
tangjinzhou Jan 25, 2022
5c23d97
doc: add tree-select demo
tangjinzhou Jan 25, 2022
53fa277
feat: add optionLabel slot
tangjinzhou Jan 27, 2022
5cc603d
doc: remove optionLabelProp, close #5212
tangjinzhou Jan 27, 2022
b952038
fix: tree-select enter error, close #5217
tangjinzhou Jan 27, 2022
037470e
fix: block not work when small size, close #5219
tangjinzhou Jan 27, 2022
42e34a6
fix: remove auto title on progress span #4929 (#4956)
srl295 Jan 28, 2022
2362467
feat: add title prop for progress, close #4929
tangjinzhou Jan 28, 2022
34869ec
release 3.0.0-beta.9
tangjinzhou Jan 28, 2022
d12edae
docs(image): add controlled preview demo (#5234)
jdwit Feb 10, 2022
c615251
doc: select add searchValue, #5236
tangjinzhou Feb 13, 2022
5d38b3c
chore: update dependencies, close #5239
tangjinzhou Feb 13, 2022
8f9875e
fix: datefns & dayjs parse strict, close #5221
tangjinzhou Feb 13, 2022
43b2188
doc: markdown format (#5240)
wjdnb Feb 14, 2022
2b0adaf
test: update snapshots
tangjinzhou Feb 14, 2022
91c6a28
fix: dropdownMatchSelectWidth:false not close virtual scroll #5242
tangjinzhou Feb 14, 2022
2d0e2b6
fix: dateFns parse strict mode
tangjinzhou Feb 14, 2022
d9cdfa6
fix: descriptions warning, close #5250
tangjinzhou Feb 17, 2022
2e0bfd1
doc: add carouse img
tangjinzhou Feb 17, 2022
2ec21c9
test: update snapshot
tangjinzhou Feb 17, 2022
ad06a9e
fix: dropdown contextmenu, close #5259
tangjinzhou Feb 17, 2022
31c3a6f
fix: tree-select cannot open issue, #5220
tangjinzhou Feb 18, 2022
6056b75
release 3.0.0-beta.10
tangjinzhou Feb 18, 2022
3cf5d4f
feat: labelCol & wrapperCol types, close #5265
tangjinzhou Feb 18, 2022
04baae5
Refactor upload (#5290)
tangjinzhou Feb 24, 2022
5edc8ca
fix: slider type warning, close #5289
tangjinzhou Feb 24, 2022
c7492a0
Refactor carousel (#5292)
tangjinzhou Feb 25, 2022
f0bc380
fix: mentions cannot select, close #5233
tangjinzhou Feb 25, 2022
78c436b
doc: update pagination change info, close #5293
tangjinzhou Feb 28, 2022
be7a73a
fix: table dynamic expand error, close #5295
tangjinzhou Feb 28, 2022
f771a1a
style: remove not use
tangjinzhou Feb 28, 2022
f0c770d
release 3.0.0-beta.11
tangjinzhou Feb 28, 2022
fe0fc80
doc: update typo
tangjinzhou Feb 28, 2022
55e0ad7
fix: menu horizontal mode shaking
tangjinzhou Mar 2, 2022
991fa77
fix: upload height error, close #5298
tangjinzhou Mar 2, 2022
639a685
release 3.0.0-beta.12
tangjinzhou Mar 2, 2022
7999cde
fix: carousel click error, close #5299
tangjinzhou Mar 4, 2022
207c944
fix: datepicker cursor for date-fns, close #5302
tangjinzhou Mar 4, 2022
4c786dd
perf: motion
tangjinzhou Mar 4, 2022
fdf7857
release 3.0.0-beta.13
tangjinzhou Mar 4, 2022
2ee3d43
Feat css var (#5327)
tangjinzhou Mar 12, 2022
87a0cd5
test: update input snap
tangjinzhou Mar 12, 2022
fe4c3e6
fix(layout-sider): support layout-sider trigger slot (#5317)
KaygNas Mar 12, 2022
fc3bd1c
feat: select add filterSort virtual listHeight, close #5310
tangjinzhou Mar 12, 2022
ce00829
doc: submenu popupOffset, close #5312
tangjinzhou Mar 12, 2022
f7e8999
fix: datePicker valueFormat log warning, close #5323
tangjinzhou Mar 12, 2022
5dd7a57
fix: tree-select not disable parent cannot checked, close #5316
tangjinzhou Mar 12, 2022
abc4894
feat: tree add activeKey
tangjinzhou Mar 12, 2022
21fd0c7
doc: update header & footer
tangjinzhou Mar 12, 2022
b3a0263
doc: add ad
tangjinzhou Mar 12, 2022
2bafbb1
test: update snap
tangjinzhou Mar 12, 2022
6373100
chore: update dist script
tangjinzhou Mar 12, 2022
ac52955
chore: remove webpack-filter-warnings-plugin
tangjinzhou Mar 12, 2022
1750e16
style: style file name
tangjinzhou Mar 13, 2022
bf2ee6f
chore: update icons pkg
tangjinzhou Mar 13, 2022
cf37535
test: update snap
tangjinzhou Mar 13, 2022
f2e58b6
chore: update compile script
tangjinzhou Mar 13, 2022
ed346d6
doc: update doc
tangjinzhou Mar 13, 2022
24ea3cd
doc: update doc
tangjinzhou Mar 13, 2022
9707506
doc: add theme demo
tangjinzhou Mar 14, 2022
2efe1af
fix: row gutter ts type
tangjinzhou Mar 15, 2022
2b8bdf3
doc: update
tangjinzhou Mar 15, 2022
a8d5dad
revert: formItem errorlist animate
tangjinzhou Mar 15, 2022
9b730ef
fix: wave's custom prefixCls not working (#5334)
showkw Mar 15, 2022
fe7ee5b
release 3.1.0-rc.0
tangjinzhou Mar 15, 2022
8f47732
style: lint code
tangjinzhou Mar 15, 2022
a314952
doc: update doc
tangjinzhou Mar 15, 2022
eb6711f
feat(components): [modal] export modalProps (#5340)
buqiyuan Mar 15, 2022
1e8bbcc
doc: update ad
tangjinzhou Mar 16, 2022
4471520
fix: item error when not use in form, close #5343
tangjinzhou Mar 16, 2022
ab26180
feat: New theme less variable for Radio, Divider, Modal, Dropdown, Dr…
tangjinzhou Mar 17, 2022
d929217
Fix Input.TextArea cut text logic when maxLength configured.
tangjinzhou Mar 17, 2022
32ffd6b
doc: update icon demo
tangjinzhou Mar 17, 2022
4b9fe82
style: less typo
tangjinzhou Mar 17, 2022
8f20fd5
feat: checkbox option support number
tangjinzhou Mar 17, 2022
adbc39b
style: some code
tangjinzhou Mar 17, 2022
fa9f1f4
feat: layout sider support dynamic breakpoint
tangjinzhou Mar 17, 2022
67939d3
perf: Improve List render perfermance when grid is undefined
tangjinzhou Mar 17, 2022
3814fc8
revert: useBreakpoint
tangjinzhou Mar 17, 2022
05ff353
feat: update locale i18
tangjinzhou Mar 17, 2022
f8cef20
doc: update menu
tangjinzhou Mar 17, 2022
00cf241
feat: update type
tangjinzhou Mar 17, 2022
85197c4
feat: pagination add responsive
tangjinzhou Mar 17, 2022
71e1100
feat: popover support empty slot
tangjinzhou Mar 17, 2022
5c9aea8
feat: radio support number option
tangjinzhou Mar 17, 2022
ccf9a41
style: some code
tangjinzhou Mar 17, 2022
2b81a72
fix: timeline custom color should work on antd icons
tangjinzhou Mar 17, 2022
625efff
fix: tooltip should work with loading switch
tangjinzhou Mar 17, 2022
bac864f
doc: update table
tangjinzhou Mar 17, 2022
73ce0ca
test: update snap
tangjinzhou Mar 17, 2022
c69cf76
chore: update pkg
tangjinzhou Mar 17, 2022
ee6d489
fix: formItem error repeat show, close #5349
tangjinzhou Mar 17, 2022
a2ecd5f
fix: table column resize not work, close #5348
tangjinzhou Mar 17, 2022
120980c
feat(components): export multiple components props (#5353)
buqiyuan Mar 18, 2022
00551b6
doc: update, close 5350
tangjinzhou Mar 18, 2022
9bd52d4
release 3.1.0-rc.1
tangjinzhou Mar 18, 2022
bc5928e
perf: virtual list
tangjinzhou Mar 18, 2022
d1e2f4f
doc: update big-data demo
tangjinzhou Mar 18, 2022
cc47bb6
fix: Update useDestroyed.ts (#5361)
fex0950 Mar 19, 2022
ea79779
revert: select listItemHeight default value
tangjinzhou Mar 19, 2022
97a0842
fix: button loading animate not work, close #5360
tangjinzhou Mar 19, 2022
17acda5
release 3.1.0-rc.2
tangjinzhou Mar 19, 2022
47e218d
fix(checkbox): onClick event triggered twice (#5363)
zhl1232 Mar 20, 2022
ecda0a1
doc: remove log
tangjinzhou Mar 19, 2022
c863385
style: checkbox.tsx #5363
tangjinzhou Mar 20, 2022
414e7a1
fix: autocomplete custom children class not work
buqiyuan Mar 20, 2022
96f5081
style: refactor vnode.js to ts
tangjinzhou Mar 20, 2022
7127a5d
perf: tree & treeselect #5365
tangjinzhou Mar 20, 2022
cec9414
chore: support pnpm (#5367)
Amour1688 Mar 20, 2022
5d9afb7
fix: layout sidebar collapsed, close #5373
tangjinzhou Mar 21, 2022
5724c84
feat: update affix ts type
tangjinzhou Mar 23, 2022
ecab7f6
fix: rangePicker showTime disabled not work, close #5286 #5380
tangjinzhou Mar 23, 2022
86e69d3
fix: upload limit error, close #5385
tangjinzhou Mar 23, 2022
e81abe3
fix: form htmlFor not work, close #5384
tangjinzhou Mar 23, 2022
d137971
fix(TimeRangePicker): disabledTime does not work (#5387) close #5383
wengjq Mar 23, 2022
7bf1e0d
fix: menu selectedKeys & openKeys support deep watch
tangjinzhou Mar 23, 2022
2feab99
fix: radio click trigger twice, close #5389
tangjinzhou Mar 24, 2022
e7fb72c
fix: Dropdown not auto adjust placement, close #5391
tangjinzhou Mar 24, 2022
b0042ab
feat: support change base-primary for cssvar
tangjinzhou Mar 24, 2022
1258825
release 3.1.0-rc.3
tangjinzhou Mar 24, 2022
e9ba9fe
doc: update changelog
tangjinzhou Mar 24, 2022
e146b48
fix: menuItem custom icon lose custom class, close #5390
tangjinzhou Mar 24, 2022
3613ece
fix: select deep watch options, close #5398
tangjinzhou Mar 25, 2022
790f83f
release 3.1.0-rc.5
tangjinzhou Mar 25, 2022
00dc2ad
chore: update ts type (#5408)
tangjinzhou Mar 26, 2022
def6a72
fix: form scrollToField not work form nest field, close #5404, #5407
tangjinzhou Mar 26, 2022
8e37ffb
doc: update demo
tangjinzhou Mar 27, 2022
afd74c9
fix: table sticky scroll bar not reactive
tangjinzhou Mar 27, 2022
80342f4
release 3.0.0-rc.5
tangjinzhou Mar 28, 2022
669b22a
fix: tabs auto overflow error for addIcon
tangjinzhou Mar 29, 2022
ec17787
fix: select option tootip error, close #5307
tangjinzhou Mar 30, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
195 changes: 195 additions & 0 deletions .antd-tools.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
const fs = require('fs');
const path = require('path');
const defaultVars = require('./scripts/default-vars');
const darkVars = require('./scripts/dark-vars');
const compactVars = require('./scripts/compact-vars');

function generateThemeFileContent(theme) {
return `const { ${theme}ThemeSingle } = require('./theme');\nconst defaultTheme = require('./default-theme');\n
module.exports = {
...defaultTheme,
...${theme}ThemeSingle
}`;
}

// We need compile additional content for antd user
function finalizeCompile() {
if (fs.existsSync(path.join(__dirname, './lib'))) {
// Build a entry less file to dist/antd.less
const componentsPath = path.join(process.cwd(), 'components');
let componentsLessContent = '';
// Build components in one file: lib/style/components.less
fs.readdir(componentsPath, (err, files) => {
files.forEach(file => {
if (fs.existsSync(path.join(componentsPath, file, 'style', 'index.less'))) {
componentsLessContent += `@import "../${path.posix.join(
file,
'style',
'index-pure.less',
)}";\n`;
}
});
fs.writeFileSync(
path.join(process.cwd(), 'lib', 'style', 'components.less'),
componentsLessContent,
);
});
}
}

function buildThemeFile(theme, vars) {
// Build less entry file: dist/antd.${theme}.less
if (theme !== 'default') {
fs.writeFileSync(
path.join(process.cwd(), 'dist', `antd.${theme}.less`),
`@import "../lib/style/${theme}.less";\n@import "../lib/style/components.less";`,
);
// eslint-disable-next-line no-console
console.log(`Built a entry less file to dist/antd.${theme}.less`);
} else {
fs.writeFileSync(
path.join(process.cwd(), 'dist', `default-theme.js`),
`module.exports = ${JSON.stringify(vars, null, 2)};\n`,
);
return;
}

// Build ${theme}.js: dist/${theme}-theme.js, for less-loader

fs.writeFileSync(
path.join(process.cwd(), 'dist', `theme.js`),
`const ${theme}ThemeSingle = ${JSON.stringify(vars, null, 2)};\n`,
{
flag: 'a',
},
);

fs.writeFileSync(
path.join(process.cwd(), 'dist', `${theme}-theme.js`),
generateThemeFileContent(theme),
);

// eslint-disable-next-line no-console
console.log(`Built a ${theme} theme js file to dist/${theme}-theme.js`);
}

function finalizeDist() {
if (fs.existsSync(path.join(__dirname, './dist'))) {
// Build less entry file: dist/antd.less
fs.writeFileSync(
path.join(process.cwd(), 'dist', 'antd.less'),
'@import "../lib/style/default.less";\n@import "../lib/style/components.less";',
);
// eslint-disable-next-line no-console
fs.writeFileSync(
path.join(process.cwd(), 'dist', 'theme.js'),
`const defaultTheme = require('./default-theme.js');\n`,
);
// eslint-disable-next-line no-console
console.log('Built a entry less file to dist/antd.less');
buildThemeFile('default', defaultVars);
buildThemeFile('dark', darkVars);
buildThemeFile('compact', compactVars);
buildThemeFile('variable', {});
fs.writeFileSync(
path.join(process.cwd(), 'dist', `theme.js`),
`
function getThemeVariables(options = {}) {
let themeVar = {
'hack': \`true;@import "\${require.resolve('ant-design-vue/lib/style/color/colorPalette.less')}";\`,
...defaultTheme
};
if(options.dark) {
themeVar = {
...themeVar,
...darkThemeSingle
}
}
if(options.compact){
themeVar = {
...themeVar,
...compactThemeSingle
}
}
return themeVar;
}

module.exports = {
darkThemeSingle,
compactThemeSingle,
getThemeVariables
}`,
{
flag: 'a',
},
);
}
}

function isComponentStyleEntry(file) {
return file.path.match(/style(\/|\\)index\.tsx/);
}

function needTransformStyle(content) {
return content.includes('../../style/index.less') || content.includes('./index.less');
}

module.exports = {
compile: {
includeLessFile: [/(\/|\\)components(\/|\\)style(\/|\\)default.less$/],
transformTSFile(file) {
if (isComponentStyleEntry(file)) {
let content = file.contents.toString();

if (needTransformStyle(content)) {
const cloneFile = file.clone();

// Origin
content = content.replace('../../style/index.less', '../../style/default.less');
cloneFile.contents = Buffer.from(content);

return cloneFile;
}
}
},
transformFile(file) {
if (isComponentStyleEntry(file)) {
const indexLessFilePath = file.path.replace('index.tsx', 'index.less');

if (fs.existsSync(indexLessFilePath)) {
// We put origin `index.less` file to `index-pure.less`
const pureFile = file.clone();
pureFile.contents = Buffer.from(fs.readFileSync(indexLessFilePath, 'utf8'));
pureFile.path = pureFile.path.replace('index.tsx', 'index-pure.less');

// Rewrite `index.less` file with `root-entry-name`
const indexLessFile = file.clone();
indexLessFile.contents = Buffer.from(
[
// Inject variable
'@root-entry-name: default;',
// Point to origin file
"@import './index-pure.less';",
].join('\n\n'),
);
indexLessFile.path = indexLessFile.path.replace('index.tsx', 'index.less');

return [indexLessFile, pureFile];
}
}

return [];
},
lessConfig: {
modifyVars: {
'root-entry-name': 'default',
},
},
finalize: finalizeCompile,
},
dist: {
finalize: finalizeDist,
},
generateThemeFileContent,
bail: true,
};
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ es/
lib/
_site/
dist/
components/version/version.tsx
75 changes: 0 additions & 75 deletions .eslintrc

This file was deleted.

100 changes: 100 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
jasmine: true,
jest: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
parser: 'babel-eslint',
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'prettier',
],
plugins: ['markdown', 'jest', '@typescript-eslint', 'import'],
overrides: [
{
files: ['*.md'],
processor: 'markdown/markdown',
rules: {
'no-console': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
extends: ['@vue/typescript/recommended', '@vue/prettier', '@vue/prettier/@typescript-eslint'],
parserOptions: {
project: './tsconfig.json',
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
],
'@typescript-eslint/ban-ts-comment': 0,
},
},
{
files: ['*.vue'],
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
rules: {
'no-console': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ vars: 'all', args: 'after-used', ignoreRestSiblings: true },
],
},
},
],
rules: {
'import/no-named-as-default': 'off',
'import/namespace': [2, { allowComputed: true }],
'import/no-named-as-default-member': 'off',
'import/no-unresolved': [2, { ignore: ['ant-design-vue'] }],
'comma-dangle': [2, 'always-multiline'],
'no-var': 'error',
'no-console': [2, { allow: ['warn', 'error'] }],
'object-shorthand': 2,
'no-unused-vars': [2, { ignoreRestSiblings: true, argsIgnorePattern: '^_' }],
'no-undef': 2,
camelcase: 'off',
'no-extra-boolean-cast': 'off',
semi: ['error', 'always'],
'vue/no-v-html': 'off',
'vue/require-explicit-emits': 'off',
'vue/require-prop-types': 'off',
'vue/require-default-prop': 'off',
'vue/no-reserved-keys': 'off',
'vue/comment-directive': 'off',
'vue/prop-name-casing': 'off',
'vue/one-component-per-file': 'off',
'vue/custom-event-name-casing': 'off',
'vue/v-on-event-hyphenation': 'off',
'vue/max-attributes-per-line': [
2,
{
singleline: 20,
multiline: 1,
},
],
'vue/multi-word-component-names': 'off',
},
globals: {
h: true,
},
};
8 changes: 0 additions & 8 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,3 @@
github: # [tangjinzhou]
open_collective: ant-design-vue
patreon: tangjinzhou
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom:
[
"https://www.paypal.me/tangjinzhou",
"https://qn.antdv.com/alipay-and-wechat.png",
"https://www.buymeacoffee.com/antdv"
]
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
key: lock-${{ github.sha }}

- name: create package-lock.json
run: npm i --package-lock-only
run: npm i --package-lock-only --ignore-scripts

- name: hack for singe file
run: |
Expand Down
Loading