working on reload of project requires during render

pull/9/head
Matthew Butterick 11 years ago
parent 6b3a3c72c7
commit 6893426d5d

@ -8,8 +8,12 @@
;; list of all eligible requires in project require directory
(define (get-project-require-files)
(define extras-directory (build-path (current-directory) world:extras-dir))
(define extras-directory (build-path (world:current-project-root) world:extras-dir))
(and (directory-exists? extras-directory)
;; #:build? option returns complete paths (instead of just file names)
(let ([files (filter project-require-file? (directory-list extras-directory #:build? #t))])
(and (not (equal? '() files)) files))))
(and (not (equal? '() files)) files))))
(module+ main
(parameterize ([world:current-project-root (string->path "/Users/mb/git/bpt/")])
(get-project-require-files)))

@ -32,7 +32,8 @@
(define (store-render-in-mod-dates . rest-paths)
(define key (make-mod-dates-key rest-paths))
(hash-set! mod-dates key (map path->mod-date-value key)))
(report key)
(hash-set! mod-dates key (report (map path->mod-date-value key))))
(module+ test
(reset-mod-dates)
@ -136,7 +137,7 @@
(or
force-render
(not (file-exists? output-path))
(mod-date-expired? source-path)
(report (mod-date-expired? source-path))
(let ([source-reloaded? (handle-source-rerequire source-path)])
source-reloaded?)))

Loading…
Cancel
Save