1 |
|
2 |
|
3 | const {
|
4 | existsSync,
|
5 | unlinkSync,
|
6 | } = require('fs');
|
7 |
|
8 | const {execSync} = require('child_process');
|
9 |
|
10 | const dirs = [
|
11 | 'dist',
|
12 | 'docs',
|
13 | '.nyc_output',
|
14 | 'coverage',
|
15 | 'node_modules',
|
16 | '.nuxt',
|
17 | ];
|
18 |
|
19 | const files = [
|
20 | 'yarn.lock',
|
21 | 'package-lock.json',
|
22 | 'coverage.lcov',
|
23 | ];
|
24 |
|
25 | dirs.forEach((d) => {
|
26 | execSync(`rm -rf ${d}`);
|
27 | });
|
28 |
|
29 | files.forEach((f) => {
|
30 | if (existsSync(f)) {
|
31 | unlinkSync(f);
|
32 | }
|
33 | });
|