Add hp/main package

This commit is contained in:
Akira Tempaku 2024-10-05 22:05:26 +09:00
commit 7bddd59dab
4 changed files with 39 additions and 34 deletions

28
src/main.lisp Normal file
View file

@ -0,0 +1,28 @@
(defpackage #:hp
(:nicknames #:hp/main)
(:use #:cl)
(:local-nicknames (#:jg #:jingle))
(:local-nicknames (#:env #:hp/env))
(:import-from #:hp/app
#:*app*)
(:export #:start
#:stop
#:update))
(in-package #:hp)
(defparameter *watch-process* nil)
(defun start ()
(when (env:dev-mode-p)
(setf *watch-process* (uiop:launch-program "make watch")))
(jg:start *app*))
(defun stop ()
(when (env:dev-mode-p)
(uiop:terminate-process *watch-process*))
(jg:stop *app*))
(defun update ()
(stop)
(ql:quickload :hp/app)
(start))