learn nodejs
- 读取css文件保存到本地
- 匹配url(...)
- 解析图片相对路径获取远程完整url
- 获取图片保存到本地,相对css文件创建文件夹
- 遍历当前文件夹获取文件列表
getAllFiles(root)
fs.readdirSync(root)
- 若子文件不是文件夹,则返回目录
!stat.isDirectory()
pathname
- 若子文件是文件夹,则遍历文件夹
stat.isDirectory()
getAllFiles(pathname)
learn nodejs
getAllFiles(root)
fs.readdirSync(root)
!stat.isDirectory()
pathname
stat.isDirectory()
getAllFiles(pathname)