Skip to content

Commit

Permalink
Merge branch 'Phillip9587-remove-shelljs'
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jul 2, 2024
2 parents 7dacbd0 + 2f2acdf commit 8c2523b
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 292 deletions.
9 changes: 4 additions & 5 deletions lib/compiler/assets-manager.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import * as chokidar from 'chokidar';
import { statSync } from 'fs';
import { copyFileSync, mkdirSync, rmSync, statSync } from 'fs';
import { sync } from 'glob';
import { dirname, join, sep } from 'path';
import * as shell from 'shelljs';
import {
ActionOnFile,
Asset,
Expand Down Expand Up @@ -137,11 +136,11 @@ export class AssetsManager {

// Copy to output dir if file is changed or added
if (action === 'change') {
shell.mkdir('-p', dirname(dest));
shell.cp(path, dest);
mkdirSync(dirname(dest), { recursive: true });
copyFileSync(path, dest);
} else if (action === 'unlink') {
// Remove from output dir if file is deleted
shell.rm(dest);
rmSync(dest, { force: true });
}
}
}
Loading

0 comments on commit 8c2523b

Please sign in to comment.