Browse Source

re-organise bits of the code (mostly packages are references).

stable
Craig Oates 2 years ago
parent
commit
7e32795392
  1. 11
      ritherdon-archive.asd
  2. 2
      src/config.lisp
  3. 4
      src/utils.lisp
  4. 42
      src/view.lisp

11
ritherdon-archive.asd

@ -42,23 +42,16 @@
) )
:pathname "src/" :pathname "src/"
;; :serial t ;; :serial t
;; I replaced the default module approach to the serial file load
;; approach because it was easier organise additional source code
;; files into sub-directories, all within /src. I kept getting
;; errors when trying to load the system when using additional
;; modules or using the :depends-on properties. I have kept the
;; original module configuration below for reference/until you feel
;; comfortable enought to delete it.
:components (;; Caveman Files :components (;; Caveman Files
(:file "config") (:file "config")
(:file "main") (:file "main")
(:file "db") (:file "db")
(:file "view") (:file "view")
;; CO-Web Specific Files ;; Ritherdon Archive Specific Files
(:file "app-constants") (:file "app-constants")
(:file "utils") (:file "utils")
(:file "models/user") (:file "models/user")
(:file "authentication") (:file "auth")
;; Caveman Files ;; Caveman Files
(:file "web")) (:file "web"))

2
src/config.lisp

@ -63,4 +63,4 @@
;;; Use this to change the environment between "development" and ;;; Use this to change the environment between "development" and
;;; "production". This change is mostly to specifiy which database the ;;; "production". This change is mostly to specifiy which database the
;;; system will use. ;;; system will use.
;; (setf (osicat:environment-variable "APP_ENV") "development") (setf (osicat:environment-variable "APP_ENV") "development")

4
src/utils.lisp

@ -1,6 +1,6 @@
(defpackage #:utils (defpackage #:utils
(:use :cl (:use #:cl
:log4cl) #:log4cl)
(:export #:format-date (:export #:format-date
#:i18n-load #:i18n-load
#:_ #:_

42
src/view.lisp

@ -1,21 +1,21 @@
(in-package :cl-user) (in-package #:cl-user)
(defpackage ritherdon-archive.view (defpackage #:ritherdon-archive.view
(:use :cl) (:use #:cl)
(:import-from :ritherdon-archive.config (:import-from #:ritherdon-archive.config
:*template-directory*) #:*template-directory*)
(:import-from :caveman2 (:import-from #:caveman2
:*response* #:*response*
:response-headers) #:response-headers)
(:import-from :djula (:import-from #:djula
:add-template-directory #:add-template-directory
:compile-template* #:compile-template*
:render-template* #:render-template*
:*djula-execute-package*) #:*djula-execute-package*)
(:import-from :datafly (:import-from #:datafly
:encode-json) :encode-json)
(:export :render (:export #:render
:render-json)) #:render-json))
(in-package :ritherdon-archive.view) (in-package #:ritherdon-archive.view)
(djula:add-template-directory *template-directory*) (djula:add-template-directory *template-directory*)
@ -41,11 +41,11 @@
(defpackage ritherdon-archive.djula (defpackage ritherdon-archive.djula
(:use :cl) (:use :cl)
(:import-from :ritherdon-archive.config (:import-from :ritherdon-archive.config
:config :config
:appenv :appenv
:developmentp :developmentp
:productionp) :productionp)
(:import-from :caveman2 (:import-from :caveman2
:url-for)) :url-for))
(setf djula:*djula-execute-package* (find-package :ritherdon-archive.djula)) (setf djula:*djula-execute-package* (find-package :ritherdon-archive.djula))

Loading…
Cancel
Save