Skip to content

Commit

Permalink
chore: use rimraf
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Feb 6, 2023
1 parent c563ff2 commit a4892db
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nuxt-config/hooks/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import path from 'path'
import { copy, mkdir, removeSync, pathExistsSync, copySync } from 'fs-extra'
import rimraf from 'rimraf'
import { copy, mkdir, pathExistsSync, copySync } from 'fs-extra'
import nitroConfig from './nitro'
import webpackConfig from './webpack'

Expand All @@ -20,7 +21,7 @@ export default {
'build:before'() {
try {
if (outDirPathExist) {
removeSync(tokenMetadataDstDir)
rimraf.sync(tokenMetadataDstDir)
}
} catch (e) {
console.log(`Error deleting dir: ${e}`)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
"@types/fs-extra": "^9.0.13",
"@types/lodash": "^4.14.168",
"@types/node": "^18.11.17",
"@types/rimraf": "^4.0.5",
"@types/vue-select": "^3.16.2",
"@vitest/coverage-c8": "^0.26.0",
"@vue/test-utils": "^2.2.8",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4428,6 +4428,13 @@
dependencies:
"@types/node" "*"

"@types/rimraf@^4.0.5":
version "4.0.5"
resolved "https://registry.yarnpkg.com/@types/rimraf/-/rimraf-4.0.5.tgz#7a59be11605c22ea3959c21ff8b28b9df1bae1b2"
integrity sha512-DTCZoIQotB2SUJnYgrEx43cQIUYOlNZz0AZPbKU4PSLYTUdML5Gox0++z4F9kQocxStrCmRNhi4x5x/UlwtKUA==
dependencies:
rimraf "*"

"@types/sax@^1.2.0":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.4.tgz#8221affa7f4f3cb21abd22f244cfabfa63e6a69e"
Expand Down Expand Up @@ -14756,6 +14763,11 @@ rfdc@^1.3.0:
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b"
integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==

rimraf@*:
version "4.1.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.1.2.tgz#20dfbc98083bdfaa28b01183162885ef213dbf7c"
integrity sha512-BlIbgFryTbw3Dz6hyoWFhKk+unCcHMSkZGrTFVAx2WmttdBSonsdtRlwiuTbDqTKr+UlXIUqJVS4QT5tUzGENQ==

rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
Expand Down

0 comments on commit a4892db

Please sign in to comment.