forked from skypher/weblocks
-
Notifications
You must be signed in to change notification settings - Fork 2
/
weblocks.asd
313 lines (294 loc) · 11.4 KB
/
weblocks.asd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(defpackage #:weblocks-asd
(:use :cl :asdf)
(:nicknames :wop)
(:export #:test #:test-op #:doc #:doc-op #:make-app #:make-app-op))
(in-package :weblocks-asd)
(defsystem weblocks
:name "weblocks"
:version "0.8.3"
:maintainer "Slava Akhmechet"
:author "Slava Akhmechet"
:licence "LLGPL"
:description "A Common Lisp web framework."
:depends-on (:closer-mop
:hunchentoot
:puri
:cl-json
:cl-who
:parenscript
:cl-fad
:fare-matcher
:cl-cont
:metatilities
:cl-ppcre
:md5
:anaphora
:f-underscore
:bordeaux-threads
:salza2
:html-template
:trivial-timeout
:trivial-backtrace)
:components ((:module src
:components (
(:file "package")
(:file "weblocks" :depends-on ("package"))
(:module utils
:components ((:file "misc")
(:file "clos")
(:file "runtime-class")
(:file "string")
(:file "list")
(:file "uri")
(:file "html")
(:file "javascript")
(:file "isearch"
:depends-on ("html"))
(:file "menu"
:depends-on ("html"))
(:file "suggest")
(:file "timing")
(:file "repl"))
:depends-on ("weblocks"))
(:file "versioning"
:depends-on ("weblocks" utils))
(:file "bundling"
:depends-on ("weblocks" utils))
(:file "dependencies"
:depends-on ("weblocks" "server" "bundling" "versioning" utils))
(:file "dom-object"
:depends-on ("weblocks" utils))
(:file "page-template"
:depends-on ("weblocks" utils "application"))
(:file "actions"
:depends-on ("weblocks" utils))
(:file "log-actions"
:depends-on ("weblocks"))
(:file "debug-mode"
:depends-on ("weblocks" "actions"))
(:file "uri-tokens"
:depends-on ("weblocks"))
(:file "request-hooks"
:depends-on ("weblocks"))
(:file "error-handler"
:depends-on ("weblocks" "application"))
(:file "request-handler"
:depends-on (utils "weblocks" "page-template" "debug-mode"
"actions" "request-hooks" "application"
"request" "dependencies" "uri-tokens"
"error-handler" store))
(:module linguistic
:components ((:file "grammar"))
:depends-on ("weblocks" utils))
(:module views
:components ((:module view
:components ((:file "view")
(:file "utils"
:depends-on ("view"))
(:file "compiler"
:depends-on ("view"))
(:file "scaffold"
:depends-on ("view" "utils"))
(:file "presentation"
:depends-on ("view" "compiler"))))
(:file "dataview"
:depends-on (view))
(:module formview
:components ((:file "formview")
(:file "helpers")
(:file "parser"
:depends-on ("formview"))
(:file "scaffold"
:depends-on ("formview" "parser"))
(:file "validation"
:depends-on ("formview"))
(:file "request-deserialization"
:depends-on ("formview" "parser"
"validation")))
:depends-on (view))
(:file "sequence-view"
:depends-on (view))
(:file "tableview"
:depends-on (view dataview "sequence-view"))
(:module
types
:components ((:file "file-upload")
(:file "us-states")
(:file "boolean")
(:file "member"
:depends-on (presentations parsers))
(:file "password")
(:module
presentations
:components ((:file "hidden")
(:file "choices")
(:file "date")
(:file "radio"
:depends-on ("choices"))
(:file "dropdown"
:depends-on ("choices"))
(:file "textarea")
(:file "paragraph")
(:file "excerpt")
(:file "image")
(:file "checkboxes")
(:file "url")
(:file "html")))
(:module
parsers
:components ((:file "common"))))
:depends-on (view formview dataview)))
:depends-on ("weblocks" "dependencies" utils))
(:module store
:components ((:file "store-api")
(:file "store-utils"))
:depends-on (weblocks utils))
(:module widgets
:components ((:module widget
:components ((:file "widget-mop")
(:file "uri-parameters-mixin")
(:file "widget"
:depends-on ("widget-mop"
"uri-parameters-mixin"))
(:file "string-widget"
:depends-on ("widget"))
(:file "funcall-widget"
:depends-on ("widget"))))
(:file "composite"
:depends-on (widget))
(:file "flash"
:depends-on (widget))
(:file "data-editor"
:depends-on (widget))
(:file "dataform"
:depends-on (widget "data-editor"))
(:file "quickform"
:depends-on (widget "dataform"))
(:file "simpleform"
:depends-on (widget "quickform"))
(:file "wizard"
:depends-on (widget "dataform"))
(:file "template-block"
:depends-on (widget))
(:file "login"
:depends-on (widget "quickform"))
(:module dataseq
:components ((:file "dataseq")
#-cmu (:file "operations-action"))
:depends-on (widget "flash"))
(:module datagrid
:components ((:file "datagrid")
(:file "sort"
:depends-on ("datagrid"))
(:file "select"
:depends-on ("datagrid"))
(:file "drilldown"
:depends-on ("datagrid")))
:depends-on (widget "dataseq"))
(:module dataedit
:components ((:file "dataedit"
:depends-on (#-cmu "delete-action"))
#-cmu (:file "delete-action"))
:depends-on (widget dataseq))
(:file "gridedit"
:depends-on (datagrid dataedit "dataform"))
(:file "listedit"
:depends-on (datalist dataedit "dataform" "quickform"))
(:file "datalist"
:depends-on (widget "dataseq"))
(:file "pagination"
:depends-on (widget "flash"))
#+(or)(:file "table-composite"
:depends-on (composite))
(:file "selector"
:depends-on (widget))
(:file "on-demand-selector"
:depends-on ("selector"))
(:file "navigation"
:depends-on ("selector" widget))
(:file "breadcrumbs"
:depends-on ("navigation")))
:depends-on (views utils "dependencies" "actions" "server" "request"
"request-hooks" "dom-object" linguistic store))
(:module control-flow
:components ((:file "call-answer")
(:file "dialog"
:depends-on ("call-answer"))
(:file "workflow"
:depends-on ("call-answer")))
:depends-on ("weblocks" "widgets" "request-handler"))
(:file "acceptor"
:depends-on ("weblocks"))
(:file "server"
:depends-on ("weblocks" "acceptor" "debug-mode" utils store))
(:file "request"
:depends-on ("weblocks" "request-hooks" "actions"))
(:file "application-mop"
:depends-on ("weblocks" "server"))
(:file "application"
:depends-on ("weblocks" "application-mop" store))
(:file "default-application"
:depends-on ("server" "weblocks" utils "request-handler")))))
:in-order-to ((asdf:test-op (load-op "weblocks-test"))
(test-op (load-op "weblocks-test"))
(doc-op (load-op "weblocks-scripts"))
(make-app-op (load-op "weblocks-scripts"))))
;;; test-op
(defmethod perform ((o asdf:test-op) (c (eql (find-system :weblocks))))
"A method specializer to run the weblocks test suite through ASDF."
(funcall (intern (symbol-name :test-weblocks) (find-package :weblocks-test))))
(defmethod operation-done-p ((o asdf:test-op) (c (eql (find-system :weblocks))))
nil)
;;;; test operation (same functionality as asdf:test-op, but defined for consistency)
(defclass wop::test-op (operation)
()
(:documentation "Allows to specialize built-in ASDF methods to run
the Weblocks test suite."))
(defmethod perform ((o wop::test-op) (c (eql (find-system :weblocks))))
"A method specializer to run the weblocks test suite through ASDF."
(funcall (intern (symbol-name :test-weblocks) (find-package :weblocks-test))))
(defmethod operation-done-p ((o wop::test-op) (c (eql (find-system :weblocks))))
nil)
;;;; doc-op operation
(defclass doc-op (operation)
()
(:documentation "Allows to specialize built-in ASDF methods to run
the Weblocks documentation generation."))
(defmethod perform ((o doc-op) (c component))
"Runs the documentation generating function."
nil)
(defmethod perform ((o doc-op) (c (eql (find-system :weblocks))))
"Runs the documentation generating function."
(funcall (intern (symbol-name :document-weblocks) (find-package :weblocks-scripts))))
(defmethod operation-done-p ((o doc-op) (c (eql (find-system :weblocks))))
nil)
;;;; make-app-op operation
(defclass make-app-op (operation)
()
(:documentation "Allows to specialize built-in ASDF methods to create
a new Weblocks app."))
(defmethod perform ((o make-app-op) (c component))
"Creates a new Weblocks application"
nil)
(defmethod perform ((o make-app-op) (c (eql (find-system :weblocks))))
"Creates a new Weblocks application when (wop:make-app 'name \"/path/to/target/\")
is called."
(let ((app-name (cadr (member :name (asdf::operation-original-initargs o))))
(app-target (cadr (member :target (asdf::operation-original-initargs o)))))
(funcall (intern (symbol-name :make-application) (find-package :weblocks-scripts))
app-name app-target)))
(defmethod operation-done-p ((o make-app-op) (c (eql (find-system :weblocks))))
nil)
;;;; helper functions that hide away the unnecessary arguments to
;;;; (asdf:operate)
(defun test ()
"Runs the Weblocks test suite together with loading the necessary packages."
(asdf:operate 'test-op :weblocks))
(defun doc ()
"Generates Weblocks documentation together with loading the necessary packages."
(asdf:operate 'doc-op :weblocks))
(defun make-app (name &optional target)
"Creates a new Weblocks app named <name> into directory <target>
based on the new-app-template."
(asdf:operate 'make-app-op :weblocks :name name :target target))