2 ;V Compile given ParenScript file.V
3 (defun compile-ps (ps-path js-path
)
4 (when (and (probe-file js-path
)
5 (< (file-write-date ps-path
)
6 (file-write-date js-path
)))
7 (return-from compile-ps
))
8 (format t
"Generating: ~A~%" (namestring js-path
))
9 (with-open-file (ps-strm ps-path
)
10 (with-open-file (js-strm js-path
:direction
:output
11 :if-exists
:supersede
)
12 (loop :for lis
= (read ps-strm nil nil
)
14 :do
(princ (eval (list 'ps lis
)) js-strm
)
15 :do
(terpri js-strm
)))))
17 (defun recompile-ps ()
18 (ensure-directories-exist
20 :directory
'(:relative
"http_root" "jsfiles")))
25 :directory
'(:relative
"src" "webui" "psfiles")
26 :name name
:type
"lisp")
28 :directory
'(:relative
"http_root" "jsfiles")
29 :name name
:type
"js")))