1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | exports.deleteOutputDir = void 0;
|
11 | const path_1 = require("path");
|
12 | const rimraf = require("rimraf");
|
13 |
|
14 |
|
15 |
|
16 | function deleteOutputDir(root, outputPath) {
|
17 | const resolvedOutputPath = path_1.resolve(root, outputPath);
|
18 | if (resolvedOutputPath === root) {
|
19 | throw new Error('Output path MUST not be project root directory!');
|
20 | }
|
21 | rimraf.sync(resolvedOutputPath);
|
22 | }
|
23 | exports.deleteOutputDir = deleteOutputDir;
|