mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 21:19:37 +08:00
b22ab1a83c
* chore: revert compile with lib * chore: lib dekko test * fix: filename has spaces * chore: bump @ant-design/tools
31 lines
762 B
JavaScript
31 lines
762 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const restCssPath = path.join(process.cwd(), 'components', 'style', 'reset.css');
|
|
|
|
function finalizeCompile() {
|
|
if (fs.existsSync(path.join(__dirname, './es'))) {
|
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'es', 'style', 'reset.css'));
|
|
}
|
|
|
|
if (fs.existsSync(path.join(__dirname, './lib'))) {
|
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'lib', 'style', 'reset.css'));
|
|
}
|
|
}
|
|
|
|
function finalizeDist() {
|
|
if (fs.existsSync(path.join(__dirname, './dist'))) {
|
|
fs.copyFileSync(restCssPath, path.join(process.cwd(), 'dist', 'reset.css'));
|
|
}
|
|
}
|
|
|
|
module.exports = {
|
|
compile: {
|
|
finalize: finalizeCompile,
|
|
},
|
|
dist: {
|
|
finalize: finalizeDist,
|
|
},
|
|
bail: true,
|
|
};
|