Skip to content

Instantly share code, notes, and snippets.

Created October 8, 2014 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/8f2c26809ed88f0e6dd0 to your computer and use it in GitHub Desktop.
Save anonymous/8f2c26809ed88f0e6dd0 to your computer and use it in GitHub Desktop.
(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)
))
@viksit
Copy link

viksit commented Oct 8, 2014

use (render [_] (filecomponent "myhtml.html {})
the last args is the transformations - which ive left empty, but usually want to make som

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment