Skip to content

Commit

Permalink
feat(reinstall): ensure remove .nuxt
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed Jul 7, 2023
1 parent bcaf172 commit f3a2ab8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
"install": "deno install --allow-read --allow-env --allow-run --allow-write --unstable -rfn n mod.ts"
},
"fmt": {
"options": {
"semiColons": false
}
"semiColons": false
},
"lock": true
}
5 changes: 5 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f3a2ab8

Please sign in to comment.