-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default main.cljs.edn generation should be customizable from other tasks #129
Comments
Idiomatic solution is that the user creates the I don't think having the options in another place (metadata) in addition to the file is a good idea. |
isn't that optional? I have a couple of projects without the file and they work fine... |
I mean, the user might not know that |
I do highly recommend creating the Boot-reload and boot-cljs-repl seem to work though they are before cljs task on the pipeline? Boot-cljs-devtools should be able to work similarly to them. |
Ok so I will ask the maintainer (or do it myself) to make clear that you need an explicit file. Thanks for the clarification, maybe we can make it clear in the README or the wiki for |
Ah, now I remember how boot-reload and boot-cljs-repl work. Boot-reload and boot-cljs-repl similarly search the fileset for existing The generated .cljs.edn file will by default This is something we could improve in future, but I don't think metadata is a solution. For now I recommend that boot-cljs-devtools creates a cljs file which requires devtools and calls the install function: https://github.com/adzerk-oss/boot-reload/blob/master/src/adzerk/boot_reload.clj#L34-L44 |
Yeah that's exactly the reason and the reason why I was thinking myself of a more generic method...I am PR-ing the |
Also, the docs could definitely use improvements regarding cljs.edn file. Looks like it is still documented only under "Multiple builds", which is quite confusing. |
I would make it a first class citizen, promoted to the main README and in Usage as well. It is kind of important 😉 |
According to the discussion in boot-clj/boot-cljs#129
I guess this is pretty much the same as #169 |
The need came out from a
boot-cljs-devtools
issue.The scenario: the user does not specify
cljs.edn
files explicitly. In general a task beforecljs
might need to add a:require
or:init-fns
clause to the defaultmain.cljs.edn
generated bycljs
.At the moment there is no way to do that and
cljs-devtools
blindly ignores the fact that we have no.cljs.edn
skipping adding stuff to it. Of course, changing the order works (e.g.:(boot ... (cljs) (cljs-devtools)
, but in general my idea is to have ways to add stuff to:require
(or:init-fns
or ...) from tasks beforecljs
.The idiomatic way is to add metadata to files in the fileset but I wanted to ask here what we should mark and of course if you folks consider this a good idea or total garbage 😄
Thanks!
The text was updated successfully, but these errors were encountered: