Downloading Files

Download Files

The download npm package is exposed globally for you to easily download files:

let dest = tmpPath() //tmp path is a path generated based on the script name
await download(
`https://johnlindquist.com/images/logo/john@2x.png`,
dest
)
// open the dir in finder to check out your newly downloaded file
await $`open ${dest}`
Discuss Post