mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
8e27cf986f
* chore: rm component less file * refactor: less file * refactor: rm less * refactor: rm page-header and comment * chore: rm less in components * chore: update dist config * chore: update image test * chore: update dekko * chore: rm lib dekko * chore: update dist dekko * chore: udpate bundle size * test: update snapshot * test: rm theme test * test: update snapshot * test: update snapshot * chore: copy reset.css * test: update image test * chore: copy reset.css to es * chore: update site script
33 lines
757 B
JavaScript
33 lines
757 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,
|
|
};
|