compiler.lisp 640 B

1234567891011121314151617181920
  1. (ql:quickload :parenscript)
  2. (in-package "PARENSCRIPT")
  3. (let ((files (directory "./lisp/*.lisp")))
  4. (dolist (file files)
  5. ;; (cl:load file)
  6. (let* ((file-name (pathname-name file))
  7. (js-file (concatenate 'string "./application/js/" file-name ".lisp.js"))
  8. (o-file (pathname js-file)))
  9. (format t "~a -> ~a" file o-file)
  10. (fresh-line)
  11. (with-open-file (output o-file
  12. :direction :output
  13. :if-exists :supersede
  14. :if-does-not-exist :create)
  15. (write-string (ps-compile-file file) output)))))
  16. (SB-EXT:EXIT)