Closed gamecubate closed 8 years ago
Ids option uses the full path instead of just the filename, I'm afraid this is documented only on the changelog: 1.7.48-3
I followed your suggestion:
(deftask teaser []
(task-options! cljs {:optimizations :advanced :ids #{"resources/js/teaser.cljs.edn"}})
(comp
(build)
(sift :include #{#"^teaser.html" #"css/*" #"media/*" #"js/teaser.js"})
(target :dir #{"release"})
))
Running the teaser task seems to work:
$ boot teaser
Writing teaser.cljs.edn.cljs.edn...
Compiling ClojureScript...
• resources/js/teaser.cljs.edn.js
Sifting output files...
Writing target dir(s)...
However, this still does not result in creation of release/js/teaser.js:
$ ls release/
css media teaser.html
Though the option takes full path, it doesn't take the extension.
Success. Thanks a lot. I had to tweak the task, changing :ids from #{"resources/js/teaser"}
to #{"js/teaser"}
. Wiki documentation for this option seems a bit sparse. It would be good for users to flesh it out.
I have 2 output targets for my project (teaser, and app) and am trying to restrict compilation to one .cljs.edn file per target.
To do that, I use the
:ids #{...}
cljs option. Here is one of my targets, named teaser:Here are the contents of the target's corresponding .cljs.edn file:
$ boot teaser
performs the compilation without errors but does not output the teaser.js file (nor does it create the release/js folder).Strangely enough, removing the :ids cljs option results in the creation of the desired output file (release/js/teaser.js) but I assume that the processing of all .cljs.edn files slows down the compilation process (correct me if I am wrong).
Am I missing something?
FWIW, here is my build.boot: