mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
a33ecfce6c
* chore: upadte pub script * chore: update config
34 lines
772 B
JavaScript
34 lines
772 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
function finalizeCompile() {
|
|
if (fs.existsSync(path.join(__dirname, './es'))) {
|
|
// Build less entry file: dist/antd.less
|
|
fs.copyFileSync(
|
|
path.join(process.cwd(), 'components', 'style', 'reset.css'),
|
|
path.join(process.cwd(), 'es', 'style', 'reset.css'),
|
|
);
|
|
}
|
|
}
|
|
|
|
function finalizeDist() {
|
|
if (fs.existsSync(path.join(__dirname, './dist'))) {
|
|
// Build less entry file: dist/antd.less
|
|
fs.copyFileSync(
|
|
path.join(process.cwd(), 'components', 'style', 'reset.css'),
|
|
path.join(process.cwd(), 'dist', 'reset.css'),
|
|
);
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
compile: {
|
|
finalize: finalizeCompile,
|
|
},
|
|
dist: {
|
|
finalize: finalizeDist,
|
|
},
|
|
bail: true,
|
|
tag: 'next',
|
|
};
|