add `raco pollen reset` for compile cache

pull/84/head
Matthew Butterick 9 years ago
parent 81fde08658
commit f0600ac371

@ -28,6 +28,7 @@
;; "second" arg is actually third in command line args, so use cddr not cdr
[("render") (handle-render (cons (get-first-arg-or-current-dir) (map very-nice-path (cddr (vector->list (current-command-line-arguments))))))]
[("version") (handle-version)]
[("reset") (handle-reset)]
[("clone" "publish") (define rest-args
(with-handlers ([exn:fail? (λ _ #f)])
(cddr (vector->list (current-command-line-arguments)))))
@ -51,12 +52,18 @@ render filename render filename only (can be source or output name)
publish copy project to desktop without source files
publish [dir] [dest] copy project in dir to dest without source files
(warning: overwrites existing dest dir)
reset reset compile cache
version print the version (~a)" (world:current-server-port) (world:current-pollen-version))))
(define (handle-version)
(displayln (world:current-pollen-version)))
(define (handle-reset)
(display "Resetting cache ...")
((dynamic-require 'pollen/cache 'reset-cache))
(displayln " done"))
(define (handle-render path-args)
(parameterize ([current-directory (world:current-project-root)])

@ -93,6 +93,10 @@ Make a copy of the project directory on the desktop, but without any source file
If you're already in your project directory and want to publish somewhere other than the desktop, use @racket[raco pollen publish _. _dest-dir].
@section{@racket[raco pollen reset]}
Resets Pollen's compile cache. Resetting does not delete the compile cache, but rather just zeroes out the cache database. On the next run, obsolete cache files will be deleted.
@section{@racket[raco pollen version]}
Would you believe this prints the Pollen version number.

Loading…
Cancel
Save