Skip to content

Commit

Permalink
fix: let end user of presta handle output dir cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehwagz committed Feb 16, 2022
1 parent 32becb3 commit 1c85ea4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions packages/presta/lib/__tests__/cli.ts
Expand Up @@ -30,11 +30,6 @@ test('buildCommand', async () => {
plan++
},
},
'fs-extra': {
emptyDirSync() {
plan++
},
},
'./build': {
build() {
plan++
Expand All @@ -44,7 +39,7 @@ test('buildCommand', async () => {

await buildCommand({})

assert.equal(plan, 6)
assert.equal(plan, 5)
})

test('devCommand', async () => {
Expand Down
3 changes: 0 additions & 3 deletions packages/presta/lib/cli.ts
@@ -1,4 +1,3 @@
import fs from 'fs-extra'
import path from 'path'
import chokidar from 'chokidar'

Expand Down Expand Up @@ -37,8 +36,6 @@ export async function buildCommand(options: PrestaCLIBuildOptions) {
const config = create(Env.PRODUCTION, { ...options, port }, configFile)
await initPlugins(config.plugins, config, hooks)

fs.emptyDirSync(config.output)

logger.info({
label: 'build',
})
Expand Down

0 comments on commit 1c85ea4

Please sign in to comment.