|
|
@ -84,6 +84,8 @@
|
|
|
|
source-path
|
|
|
|
source-path
|
|
|
|
maybe-output-path
|
|
|
|
maybe-output-path
|
|
|
|
maybe-template-path)
|
|
|
|
maybe-template-path)
|
|
|
|
|
|
|
|
(unless (file-exists? source-path)
|
|
|
|
|
|
|
|
(raise-argument-error caller "existing source path" source-path))
|
|
|
|
(define output-path (or maybe-output-path (->output-path source-path)))
|
|
|
|
(define output-path (or maybe-output-path (->output-path source-path)))
|
|
|
|
(unless output-path
|
|
|
|
(unless output-path
|
|
|
|
(raise-argument-error caller "valid output path" output-path))
|
|
|
|
(raise-argument-error caller "valid output path" output-path))
|
|
|
@ -124,6 +126,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
(define+provide/contract (render source-path [maybe-template-path #f] [maybe-output-path #f])
|
|
|
|
(define+provide/contract (render source-path [maybe-template-path #f] [maybe-output-path #f])
|
|
|
|
((complete-path?) ((or/c #f complete-path?) (or/c #f complete-path?)) . ->* . (or/c string? bytes?))
|
|
|
|
((complete-path?) ((or/c #f complete-path?) (or/c #f complete-path?)) . ->* . (or/c string? bytes?))
|
|
|
|
|
|
|
|
(unless (file-exists? source-path)
|
|
|
|
|
|
|
|
(raise-argument-error 'render "existing source path" source-path))
|
|
|
|
(define output-path (or maybe-output-path (->output-path source-path)))
|
|
|
|
(define output-path (or maybe-output-path (->output-path source-path)))
|
|
|
|
(unless output-path
|
|
|
|
(unless output-path
|
|
|
|
(raise-argument-error 'render "valid output path" output-path))
|
|
|
|
(raise-argument-error 'render "valid output path" output-path))
|
|
|
|