1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-23 01:27:14 +02:00
pigallery2/test/folder-reset.ts
2023-09-06 12:56:52 +02:00

15 lines
267 B
TypeScript

import * as fs from 'fs';
declare const process: { argv: string[] };
const dir = process.argv[2];
if (fs.existsSync(dir)) {
console.log('deleting folder:' + dir);
fs.rmSync(dir, {recursive: true});
}
console.log('creating folder:' + dir);
fs.mkdirSync(dir);