macos-defaults/record/record-next.mjs

23 lines
569 B
JavaScript
Raw Normal View History

2020-11-27 14:01:10 +00:00
import path from 'path'
const FILES = [
'dock/orientation/bottom.js',
'dock/orientation/left.js',
'dock/orientation/right.js',
'finder/AppleShowAllFiles/false.js',
'finder/AppleShowAllFiles/true.js',
]
console.info(`\nFound ${FILES.length} scripts to run.`)
for (const scriptFile of FILES) {
const script = await import(`./${scriptFile}`)
await script.run(getImagePath(scriptFile))
}
console.info(`\nAll videos and screenshots were successfully recorded.\n`)
function getImagePath(file) {
return path.normalize(`../images/${path.dirname(file)}`)
}