Change compile to compile-site and add clean param.

master
thintz 11 years ago
parent b766f4ae07
commit 69a6f9c3ff

@ -12,7 +12,7 @@
; core functions ; core functions
add-page! delete-page! add-css! delete-css! add-page! delete-page! add-css! delete-css!
add-file-resource! delete-file-resource! add-file-resource! delete-file-resource!
compile compile-site
) )
(import chicken scheme files srfi-1 extras ports irregex) (import chicken scheme files srfi-1 extras ports irregex)
@ -110,8 +110,8 @@
(file-copy (++ (res-dir) "/" p) path-out))) (file-copy (++ (res-dir) "/" p) path-out)))
*file-resources*)) *file-resources*))
(define (compile) (define (compile-site #!key (clean #t))
(and (directory? (out-dir)) (delete-directory (out-dir) #t)) (when clean (and (directory? (out-dir)) (delete-directory (out-dir) #t)))
(output-pages) (output-pages)
(output-stylesheets) (output-stylesheets)
(copy-file-resources)) (copy-file-resources))

Loading…
Cancel
Save