419 Exclusion of CLJS source file/s or directory/ies to be excluded from compilation #20

wants to merge 30 commits into


None yet

3 participants


The patch includes some tests:

  1. script/test-exclusion, which simply test the exclusion of every cljs source file from compilation;
  2. script/run-compiler-test, which runs the available test assertions relative to the new features.

NOTE 1: cljsc command line is very fragile and has been tested only with very few happy paths.

It has been defined a new protocol named Excludable. It has the function -exclude which has been implemented for clojure.lang.PersistentVector, java.lang.String, and nil. In this way it will be possibile in the future to extend Excludable protocol to namespace and/or even to single function.

NOTE 2: lein-cljsbuild plug-in works without any modification, just use the new :exclude option in the :compiler options of your project.clj.

;;; example 1
... :compiler {:output-to "public/js/main.js"
                     :optmizations :advanced
                     :exclude "<to-be-exclude-file-or-directory>"

;;; example 2 
... :compiler {:output-to "public/js/main.js"
                     :optmizations :advanced
                     :exclude ["<to-be-exclude-file-or-directory>" ... "<to-be-exclude-file-or-directory>]"

Hope you'll find it you useful.

My best


Mimmo we don't take pull requests. We need a single patch in JIRA attached to the ticket, preferable flattened instead of many commits like this one. Also I see that two other people were involved in the development of this patch, did they also submit their CAs? Thank you very much.


Hi Davide I just attached to jira 419 issue the flattened single patch. Regarding Francesco and Federico which I'm training on Clojure, next monday their CA will be on the way.

Thanks to be so patient

@magomimmo magomimmo closed this Dec 7, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment