UNPKG

dis-cli

Version:

A package for easily generating discord bot projects

12 lines (9 loc) 330 B
const fs = require('fs-extra') const path = require('path') module.exports = async function writeFileTree (dir, files, previousFiles) { Object.keys(files).forEach((name) => { const filePath = path.join(dir, name) fs.ensureDirSync(path.dirname(filePath)) fs.writeFileSync(filePath, files[name]) }) }