Skip to content

Commit 8c2523b

Browse files
Merge branch 'Phillip9587-remove-shelljs'
2 parents 7dacbd0 + 2f2acdf commit 8c2523b

File tree

3 files changed

+46
-292
lines changed

3 files changed

+46
-292
lines changed

lib/compiler/assets-manager.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as chokidar from 'chokidar';
2-
import { statSync } from 'fs';
2+
import { copyFileSync, mkdirSync, rmSync, statSync } from 'fs';
33
import { sync } from 'glob';
44
import { dirname, join, sep } from 'path';
5-
import * as shell from 'shelljs';
65
import {
76
ActionOnFile,
87
Asset,
@@ -137,11 +136,11 @@ export class AssetsManager {
137136

138137
// Copy to output dir if file is changed or added
139138
if (action === 'change') {
140-
shell.mkdir('-p', dirname(dest));
141-
shell.cp(path, dest);
139+
mkdirSync(dirname(dest), { recursive: true });
140+
copyFileSync(path, dest);
142141
} else if (action === 'unlink') {
143142
// Remove from output dir if file is deleted
144-
shell.rm(dest);
143+
rmSync(dest, { force: true });
145144
}
146145
}
147146
}

0 commit comments

Comments
 (0)