mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-16 22:43:08 +00:00
11 lines
441 B
JavaScript
11 lines
441 B
JavaScript
const fs = require('fs')
|
|
const Handlebars = require('handlebars')
|
|
|
|
module.exports = (defaults, templatesPath, destinationPath) => {
|
|
fs.mkdirSync(destinationPath)
|
|
fs.mkdirSync(`${destinationPath}/docs`)
|
|
|
|
const homeTemplate = fs.readFileSync(`${templatesPath}/home.md.handlebars`, 'utf8')
|
|
const rootReadmeContent = Handlebars.compile(homeTemplate)(defaults)
|
|
fs.writeFileSync(`${destinationPath}/docs/readme.md`, rootReadmeContent)
|
|
}
|