Rename define-asset to defasset
This commit is contained in:
parent
385e98f2ef
commit
da279fc12b
3 changed files with 11 additions and 11 deletions
src/view
|
@ -3,7 +3,7 @@
|
|||
(:local-nicknames (#:re #:cl-ppcre))
|
||||
(:local-nicknames (#:cfg #:hp/config/asset))
|
||||
(:export #:asset-root
|
||||
#:define-assets
|
||||
#:defasset
|
||||
#:get-css-paths
|
||||
#:cmp-props))
|
||||
(in-package #:hp/view/asset)
|
||||
|
@ -18,7 +18,7 @@
|
|||
(lambda (path)
|
||||
(asset-path kind path)))
|
||||
|
||||
(defmacro define-asset (name kind files)
|
||||
(defmacro defasset (name kind files)
|
||||
`(defparameter ,name
|
||||
(,(if (listp files) 'mapcar 'funcall)
|
||||
(asset-path-under ,kind) ',files)))
|
||||
|
|
|
@ -2,24 +2,24 @@
|
|||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:import-from #:hp/view/asset
|
||||
#:define-asset)
|
||||
#:defasset)
|
||||
(:export #:scripts))
|
||||
(in-package #:hp/view/components/document/scripts)
|
||||
|
||||
(define-asset *global-js*
|
||||
(defasset *global-js*
|
||||
:js "global.js")
|
||||
|
||||
(define-asset *htmx*
|
||||
(defasset *htmx*
|
||||
:vendor "htmx@1.9.12.js")
|
||||
|
||||
(define-asset *htmx-extentions*
|
||||
(defasset *htmx-extentions*
|
||||
:htmx-ext ("alpine-morph@1.9.12.js"
|
||||
"head-support@1.9.12.js"))
|
||||
|
||||
(define-asset *alpine*
|
||||
(defasset *alpine*
|
||||
:vendor "alpine@3.13.8.js")
|
||||
|
||||
(define-asset *alpine-extentions*
|
||||
(defasset *alpine-extentions*
|
||||
:alpine-ext ("async-alpine@1.2.2.js"
|
||||
"persist@3.13.8.js"
|
||||
"morph@3.13.8.js"))
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
(:use #:cl)
|
||||
(:local-nicknames (#:pi #:piccolo))
|
||||
(:import-from #:hp/view/asset
|
||||
#:define-asset
|
||||
#:defasset
|
||||
#:get-css-paths)
|
||||
(:export #:on-demand-styles
|
||||
#:styles))
|
||||
(in-package #:hp/view/components/document/styles)
|
||||
|
||||
(define-asset *ress*
|
||||
(defasset *ress*
|
||||
:vendor "ress@5.0.2.css")
|
||||
|
||||
(define-asset *global-css*
|
||||
(defasset *global-css*
|
||||
:css "global.css")
|
||||
|
||||
(pi:define-element on-demand-styles ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue