mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-12-14 21:52:33 +00:00
22 lines
792 B
JavaScript
22 lines
792 B
JavaScript
const fs = require('fs')
|
|
const YAML = require('yaml')
|
|
|
|
const writeHomepage = require('./write-homepage')
|
|
const writeCategories = require('./write-categories')
|
|
const writePages = require('./write-pages')
|
|
const writeConfig = require('./write-config')
|
|
|
|
const input = fs.readFileSync('../../defaults.yml', 'utf8')
|
|
const defaults = YAML.parse(input)
|
|
|
|
const templatesPath = 'templates'
|
|
const initialDestinationPath = 'dist-initial'
|
|
const destinationPath = 'dist'
|
|
|
|
writeHomepage({}, templatesPath, initialDestinationPath)
|
|
writeConfig({}, templatesPath, initialDestinationPath)
|
|
|
|
writeHomepage(defaults, templatesPath, destinationPath)
|
|
writeCategories(defaults, templatesPath, destinationPath)
|
|
writePages(defaults, templatesPath, destinationPath)
|
|
writeConfig(defaults, templatesPath, destinationPath)
|