https://github.com/Deraen/clojurescript/commit/bb94e566a8827d0356740491e2506fba02faa109
- Load all
js_transform.cljfiles in classpath - Problems:
- files are not real namespaces (no
ns) load-readerwill eval the code in file each timeload-js-transforms!is called, which is each timecljs.closure/buildis called- a
js_transform.cljfile is loaded even ifjs-transformsmethod from it is not needed- for example, if any lib in classpath has dep on
cljsjs/babel-standalone
- for example, if any lib in classpath has dep on
- files are not real namespaces (no
https://github.com/Deraen/clojurescript/commit/9866a33c78ebf882e5e01d07316d00c7794e8edc
- If
js-transformsmethod is not found, but the value is namespaced keyword, try to load namespace pointed by the namespace part of the keyword and runjs-transformsagain in hopes that the namespace provided the method - If namespace doesn't provide the method, there will be a warning about unsupported preprocess value
- Benefits vs. Option 1:
- Real namespaces
- Works with current
cljsjs/babel-standalone - Minimal change
:preprocessvalue should be a symboljs-transformsmultimethod is removed- symbol will point directly at a function, the namespace is required if needed
- Benefits:
- Using a symbol to refer to a function is better than refering to a multimethod using namespaced keyword
:preprocessshould be allowed to be vector of transformations to run?- Would be handled at
process-js-modules, will work with options 2 and 3
- Would be handled at
It should be easy to leave the multimethod version around and use that when the value is keyword).
I agree that vector support can be added later, if needed.