mirror of
https://github.com/yannbertrand/macos-defaults
synced 2024-11-14 15:47:16 +00:00
78d713f8ab
* ⬆️ Upgrade prettier to v3 * 🚨 Run prettier v3 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com> |
||
---|---|---|
.. | ||
autohide-delay | ||
autohide-time-modifier | ||
mineffect | ||
orientation | ||
show-recents | ||
tilesize | ||
readme.js |
const MacRunner = require('../mac-runner') const { compressPngImage } = require('../utils') module.exports = { run: async (outputPath) => { console.log('> Recording dock readme screenshot') try { const { screenWidth, screenHeight } = MacRunner.getScreenSize() const dockHeight = MacRunner.getDockHeight() const runner = new MacRunner() await runner .captureScreenRect( 0, screenHeight - dockHeight, screenWidth, dockHeight, `${outputPath}/dock-tmp.png`, ) .run() } catch (runnerError) { throw new Error(runnerError) } try { await compressPngImage(`${outputPath}/dock-tmp.png`, outputPath, 'dock') } catch (compressPngImageError) { throw new Error(compressPngImageError) } return { filepath: `${outputPath}/dock` } }, }