import 'dotenv/config' import { rm } from 'fs' const args = process.argv if (args.length < 3) throw new Error('No dir arg') const dirType = args[2] const dir = dirType === 'dist' ? './dist' : process.env.TINKR_DIR if (dir === undefined) throw new Error('Missing tinkr directory config.') rm(dir, { recursive: true }, () => { console.log(`Done clearing directory ${dir}`) })