cljsjs / boot-cljsjs

Helper tasks to aid the packaging of JS dependencies for Clojurescript projects
66 stars 22 forks source link

More explanation #15

Closed pandeiro closed 9 years ago

pandeiro commented 9 years ago

As a user and having read the README here and in packages, I'm still not sure about a few things:

a). What, if anything, I need to include manually in my HTML file to load my ClojureScript app and dependencies b). What, if anything, I need to include manually in my HTML file to load non-JS dependencies (eg, CSS files, images, other assets that are packaged via cljsjs)

An illustration of this in the README would complement the build.boot example well.

martinklepsch commented 9 years ago

a) You don't need to do anything. In all optimisation modes boot-cljs should handle adding includes/externs to your build.

b) That still hasn't been worked out. I think currently files that don't end in ["inc.js" "ext.js" "lib.js"] aren't even ending up in your target directory. Probably some clever usage of the sift task could help here.

pandeiro commented 9 years ago

Thanks @martinklepsch, regarding a), that makes sense but it would still be useful to include that info (or a minimal index.html example) somewhere.

On b), it appears that some packaged libraries include CSS, so even if the user must do something manually, I think the boot-cljsjs README should mention it at least.

martinklepsch commented 9 years ago

Oh right, adding these things to the README would definitely be a welcome change. I'm not too familiar with it myself but maybe @Deraen tried something with non js files in cljsjs packages that'd be a good example?

Deraen commented 9 years ago

Not really, I have mostly used webjars for css/less.

But I guess some sift examples would be helpful. (sift :move {"^cljsjs/.*/([^/]*.css)$" "public/css/$1"}) or such should copy any css files in cljsjs packages to public/css/ folder on target etc.

martinklepsch commented 9 years ago

I'm closing this as now :foreign-libs are used and the README changed significantly. Feel free to open other issues if there are any questions.