import { config } from 'dotenv'; import yargs from 'yargs/yargs'; import { getAllBucketFilesAndCopy } from './minify_initial_images/index'; config(); const { argv } = yargs(process.argv.slice(2)); getAllBucketFilesAndCopy({ folder: (argv.folder as string) || 'uploads/' }) .then((count) => console.log(count)) .catch((error: Error) => console.error(error));