๐Ÿ“ฆ payloadcms / next-payload

๐Ÿ“„ copyFile.js ยท 9 lines
1
2
3
4
5
6
7
8
9const fs = require('fs')

const copyFile = (source, target) => {
  if (!fs.existsSync(target)) {
    fs.writeFileSync(target, fs.readFileSync(source));
  }
}

module.exports = copyFile