mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-14 11:20:20 -06:00
12 lines
305 B
JavaScript
12 lines
305 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
const mkdirp = require('mkdirp')
|
|
|
|
module.exports = function writeFileTree (dir, files) {
|
|
for (const name in files) {
|
|
const filePath = path.join(dir, name)
|
|
mkdirp.sync(path.dirname(filePath))
|
|
fs.writeFileSync(filePath, files[name])
|
|
}
|
|
}
|