docs: 更新日志

This commit is contained in:
就眠儀式
2022-02-18 09:39:37 +08:00
parent 64fb5e9e59
commit 818790ad27
2 changed files with 5 additions and 4 deletions

View File

@@ -5,19 +5,19 @@
var fs = require('fs');
var { resolve } = require('path');
// @ts-ignore
const inputDir = resolve(process.cwd(), './src/component')
// @ts-ignore
const inputsArray = fs.readdirSync(inputDir).filter((name) => {
const componentDir = resolve(inputDir, name)
const isDir = fs.lstatSync(componentDir).isDirectory()
return isDir && fs.readdirSync(componentDir).includes('index.ts')
})
// 读取基础变量 与 公共样式
var content = fs.readFileSync("./src/theme/variable.less").toString() + '\n\n';
content += fs.readFileSync("./src/theme/index.less").toString() + '\n\n';
// 组件样式
inputsArray.forEach(function (f) {
var path = "./src/component/" + f + "/index.less";
fs.exists(path, function (exists) {
@@ -29,4 +29,4 @@ inputsArray.forEach(function (f) {
fs.writeFileSync('./lib/index.less', content);
}
});
})
})