Ai
1 Star 0 Fork 0

zzz/nodeFrontRear

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
removeJs.js 577 Bytes
一键复制 编辑 原始数据 按行查看 历史
zzz 提交于 2023-04-27 18:18 +08:00 . init
const fs = require("fs")
const path = require("path")
const isDir = (dirPath = "./src") => {
fs.readdirSync(dirPath).forEach((item) => {
const p = path.resolve(dirPath, item)
console.log("ddd", item, p)
fs.stat(p, (err, stats) => {
if (err) {
console.log("err", err)
return false
} else if (stats.isFile()) {
if (item.endsWith(".js") || item.endsWith(".js.map")) {
console.log("FILE: ", p)
fs.unlinkSync(p)
}
} else if (stats.isDirectory()) {
isDir(p)
}
})
})
}
isDir()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/zzzPython/node-front-rear.git
git@gitee.com:zzzPython/node-front-rear.git
zzzPython
node-front-rear
nodeFrontRear
master

搜索帮助