UNPKG

pob-babel

Version:

Build and watch with babel and typescript

11 lines (9 loc) 308 B
import fs from 'fs'; import path from 'path'; export function cleanOutDirectory({ outDirectory = 'dist' } = {}) { if (fs.rmSync) { fs.rmSync(path.resolve(outDirectory), { recursive: true, force: true }); } else { fs.rmdirSync(path.resolve(outDirectory), { recursive: true, force: true }); } }