lynaghk/cljx — pull request #55 by mx (2014-11-09 00:18:57+00:00)
Title: Extend #+clj(s) conditionals to active profiles

CLJX is great for conditionally including code and requirements for CLJ/CLJS projects. I have a project that I would like to perform some conditional includes on based on optional dependencies. Leiningen supports optional dependencies nicely using profiles, but there is no straightforward way to express code that should go away when the option is not present.

Thus, I have extended CLJX to also support profile names in the same way it supports #+clj and #+cljs. For example, if you have a profile called "thrift" active, you can do the following in a CLJX file:

#+thrift [55 66]

and this will only appear in the output CLJ file when the thrift profile is active, exactly like it works for clj/cljs.