generated from markthree/deno-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(reinstall): ensure remove .nuxt
- Loading branch information
Showing
2 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ import { | |
unInstall as _uninstall, | ||
} from "./pm.ts" | ||
import { version } from "./version.ts" | ||
import { exists } from "https://deno.land/[email protected]/fs/exists.ts" | ||
|
||
function formatOptions(originOptions: Record<string, string | boolean>) { | ||
const options = Object.keys(originOptions).filter((k) => { | ||
|
@@ -113,6 +114,10 @@ export async function action(currentPM: PM) { | |
} | ||
} | ||
|
||
if (await exists(".nuxt")) { | ||
await emptyDir(".nuxt") | ||
} | ||
|
||
const node_modules_path = await findUp(["node_modules"]) | ||
if (node_modules_path) { | ||
await emptyDir(node_modules_path) | ||
|