Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
knobo committed Jul 10, 2018
1 parent 63c372a commit 782e5d2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -11,6 +11,15 @@ live-reload prototype for clack
```
Install live-reload plugin for your browser, and it *should* work.

### Manually add files to watch for changes


```lisp
;; example:
(live-reload:add #p"/path/templates/djula-template..html" "/url/mypage")
```


## License

LLGPL
Expand Down
4 changes: 2 additions & 2 deletions live-reload.lisp
Expand Up @@ -33,15 +33,15 @@
(log:info "Notify update:" urls)))))

(defmacro mlcar ((el list) &body body)
"Map lambda char. Syntactic sugar for map."
"Map lambda char. Syntactic sugar for mapcar."
`(mapcar (lambda (,el) ,@body) ,list))

(defun run-thread ()
(bt:make-thread
(lambda ()
(let ((files (mlcar (file (alexandria:hash-table-keys *files*))
(list file inotify:in-close-write))))
(inotify:with-inotify (inot files) ;; (list #P"/home/knobo/foo.ps" inotify:in-close-write)
(inotify:with-inotify (inot files)

(let ((thread (bt:make-thread
(lambda () (event-listener inot))
Expand Down

0 comments on commit 782e5d2

Please sign in to comment.