-
-
Save viksit/55379a721047f7280746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ncdoffice.macros | |
(:require [clojure.java.io :as io]) | |
(:require [kioo.core :as kioo]) | |
(:require [kioo.om :refer [deftemplate]])) | |
(defmacro filecomponent [path transforms] | |
(let [file (io/file (str "build/client/" path))] | |
`(kioo/component ~file ~transforms) | |
)) | |
<nonuby> then you can just use (render [_] (filecomponent "myhtml.html {}) | |
* sveri ([email protected]) has joined #clojure | |
<nonuby> the last args is the transformations - which ive left empty, but usually want to make some |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment