1
1
mirror of https://github.com/c8r/x0.git synced 2024-08-17 09:20:52 +03:00

Only remove output dir if it exists

This commit is contained in:
John Otander 2017-10-19 14:17:56 -06:00
parent 1b8dde837d
commit a5bf70ba49
2 changed files with 5 additions and 1 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ package-lock.json
site
coverage
.nyc_output
test/output

View File

@ -64,7 +64,10 @@ test.cb('static picks up routes config', t => {
})
test.cb('static makes a directory', t => {
fs.rmdirSync(output)
if (fs.existsSync(output)) {
fs.rmdirSync(output)
}
x0Static(hello, {
outDir: 'test/output'
}, (err, result) => {