fix: 🐛 should only read json files

This commit is contained in:
bubkoo
2021-03-23 01:12:09 +08:00
committed by 问崖
parent de19a10a26
commit e7999623f0

View File

@ -17,7 +17,7 @@ const files = fs.readdirSync(root)
files.forEach((name: string) => {
const file = path.join(root, name)
const stat = fs.statSync(file)
if (stat.isFile() && name !== reserved) {
if (stat.isFile() && path.extname(file) === '.json' && name !== reserved) {
pkgs.push(file)
}
})