forked from Deuxfleurs/site
Fix no static folder bug
This commit is contained in:
parent
882375c54f
commit
2e528b86ad
1 changed files with 6 additions and 1 deletions
|
@ -206,6 +206,7 @@ const do_pug = (prt, root) => async tree => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const rm_tree = t => {
|
const rm_tree = t => {
|
||||||
|
if (t == null) return
|
||||||
if (t.type == 'file') {
|
if (t.type == 'file') {
|
||||||
log('[do_clean] file', t.path)
|
log('[do_clean] file', t.path)
|
||||||
return fs.unlink(t.path)
|
return fs.unlink(t.path)
|
||||||
|
@ -219,7 +220,11 @@ const rm_tree = t => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const do_clean = path => tree => walk(path).then(rm_tree).then(_ => tree)
|
const do_clean = path => tree =>
|
||||||
|
walk(path)
|
||||||
|
.catch(_ => null)
|
||||||
|
.then(rm_tree)
|
||||||
|
.then(_ => tree)
|
||||||
|
|
||||||
const conf = { src: './src', dest: './static'}
|
const conf = { src: './src', dest: './static'}
|
||||||
walk(conf.src)
|
walk(conf.src)
|
||||||
|
|
Loading…
Reference in a new issue