Skip to content

Commit

Permalink
remove fs-extra
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Nov 28, 2024
1 parent 91c6399 commit 65979c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@
"@stylistic/eslint-plugin": "^2.10.1",
"@stylistic/stylelint-config": "^2.0.0",
"@types/dedent": "^0.7.2",
"@types/fs-extra": "^9.0.13",
"@vitest/coverage-v8": "^2.1.4",
"change-case": "^4.1.2",
"dedent": "^0.7.0",
"eslint": "^9.14.0",
"fs-extra": "^10.1.0",
"globals": "^15.12.0",
"husky": "^7.0.4",
"lint-staged": "^11.2.6",
Expand Down
22 changes: 0 additions & 22 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions scripts/generateComponent.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs-extra'
import fs from 'node:fs/promises'
import { existsSync } from 'node:fs'
import dedent from 'dedent'
import prompt from 'prompt'
import path from 'node:path'
Expand Down Expand Up @@ -46,7 +47,7 @@ const COMPONENT_GROUPS = {

const componentDir = path.join(componentsDir, componentGroup, componentName)

const exists = fs.existsSync(componentDir)
const exists = existsSync(componentDir)
if (exists) {
console.log('Component already exists.')
return
Expand All @@ -56,7 +57,7 @@ const COMPONENT_GROUPS = {

// Create directory
console.log(`Create directory at ${componentDir}`)
await fs.mkdirp(componentDir)
await fs.mkdir(componentDir, { recursive: true })

/**
* Write component file
Expand Down

0 comments on commit 65979c0

Please sign in to comment.