diff --git a/.gitignore b/.gitignore index 788a3ae..80d43bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /docs/ /.qlot/ README +*.fasl diff --git a/src/autobuilder.lisp b/src/autobuilder.lisp index 827973e..81881d7 100644 --- a/src/autobuilder.lisp +++ b/src/autobuilder.lisp @@ -9,6 +9,8 @@ (:import-from #:fs-watcher) (:import-from #:trivial-open-browser #:open-browser) + (:import-from #:alexandria + #:remove-from-plistf) (:export #:build #:stop)) (in-package #:docs-autobuilder) @@ -67,10 +69,17 @@ (subseq file 0 (length root)))))) -(defun build (system &key in-thread port (interface "localhost")) +(defun build (system &rest rest-args + &key in-thread port (interface "localhost") + &allow-other-keys) (when *server* (error "Server already running.")) + (remove-from-plistf rest-args + :in-thread + :port + :interface) + (let* ((system-path (asdf:system-relative-pathname system "./")) (docs-path (handler-bind ((docs-builder:documentation-has-problems (lambda (c) @@ -88,7 +97,9 @@ :address interface))) (url (format nil "http://~A:~A/" interface port))) - (open-browser url) + + (with-simple-restart (skip-opening-the-browser "Skip opening the browser") + (open-browser url)) (labels ((build-system (changed-file) (cond @@ -105,7 +116,8 @@ (handler-case (progn (ql:quickload system) - (docs-builder:build system)) + (apply #'docs-builder:build system + rest-args)) (docs-builder:documentation-has-problems (c) (log:error "Unable to build docs for ~A system. ~A" system c))