diff --git a/command.rkt b/command.rkt index 17bf23b..2f05889 100644 --- a/command.rkt +++ b/command.rkt @@ -131,7 +131,8 @@ version print the version (~a)" (world:current-server-port) (worl (when (directory-exists? target-dir) (delete-directory/files target-dir)) (copy-directory/files source-dir target-dir) - (for-each delete-it (find-files pollen-related-file? target-dir)) + (parameterize ([world:current-project-root (current-directory)]) + (for-each delete-it (find-files pollen-related-file? target-dir))) (displayln (format "completed to ~a" target-dir))) (define (handle-unknown command) diff --git a/file.rkt b/file.rkt index bd7147b..2110380 100644 --- a/file.rkt +++ b/file.rkt @@ -238,10 +238,11 @@ (and (directory-exists? path) (or (ends-with? (path->string path) "compiled")))) -(define+provide (cache-file? path) - (or (ends-with? (path->string path) (world:current-cache-filename)))) +(define+provide (cache-file? path) + (ormap (λ(cache-name) (ends-with? (path->string path) cache-name)) world:cache-names)) +(require sugar/debug) (define+provide (pollen-related-file? file) (ormap (λ(proc) (proc file)) (list preproc-source? @@ -253,4 +254,5 @@ null-source? racket-source? magic-directory? - cache-file?))) \ No newline at end of file + cache-file? + (world:current-unpublished-path?)))) \ No newline at end of file diff --git a/scribblings/world.scrbl b/scribblings/world.scrbl index fd1b26a..b800d35 100644 --- a/scribblings/world.scrbl +++ b/scribblings/world.scrbl @@ -129,4 +129,6 @@ Default separators used in decoding. The first two are initialized to @racket["\ @defoverridable[compile-cache-active boolean?]{Whether the compile cache, which speeds up interactive sessions by saving compiled versions of Pollen source files, is active. Default is active (@racket[#t]).} -@defoverridable[compile-cache-max-size exact-positive-integer?]{Maximum size of the compile cache. Default is 10 megabytes.} \ No newline at end of file +@defoverridable[compile-cache-max-size exact-positive-integer?]{Maximum size of the compile cache. Default is 10 megabytes.} + +@defoverridable[unpublished-path? (path? . -> . boolean?)]{Predicate that determines whether a path is omitted from @secref{raco_pollen_publish} operations. If the predicate is @racket[#t], then the path is omitted. The default, therefore, is @racket[#f].} \ No newline at end of file diff --git a/world.rkt b/world.rkt index cae2d2d..216190f 100644 --- a/world.rkt +++ b/world.rkt @@ -86,4 +86,6 @@ (define-settable extension-escape-char #\!) (define-settable compile-cache-active #t) -(define-settable compile-cache-max-size (* 10 1024 1024)) ; = 10 megabytes \ No newline at end of file +(define-settable compile-cache-max-size (* 10 1024 1024)) ; = 10 megabytes + +(define-settable unpublished-path? (λ(path) #f)) \ No newline at end of file