MCPcopy
hub / github.com/vitejs/vite / clearAnyPreviousFolders

Function clearAnyPreviousFolders

packages/create-vite/__tests__/cli.spec.ts:53–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 .sort()
52
53const clearAnyPreviousFolders = () => {
54 if (fs.existsSync(genPath)) {
55 fs.rmSync(genPath, { recursive: true, force: true })
56 }
57 if (fs.existsSync(genPathWithSubfolder)) {
58 fs.rmSync(genPathWithSubfolder, { recursive: true, force: true })
59 }
60}
61
62beforeAll(() => clearAnyPreviousFolders())
63afterEach(() => clearAnyPreviousFolders())

Callers 1

cli.spec.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected