cljsjs / boot-cljsjs

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

Allow users to specify additional provides clauses #36

Closed timothypratley closed 7 years ago

timothypratley commented 8 years ago

deps.cljs can provide multiple namespaces, it would be useful for packaging some cljs projects like firebase and firebase-node

Izzimach commented 7 years ago

I actually need this myself for react-pixi.

I hacked up a variant of deps-cljs that takes a vector of strings for the providers instead of a single string here. Does that seem reasonable?

Another method would be to modify deps-cljs so that it works both ways. That is, the provider could be a single string or a vector of strings. I'm not sure which is preferable TBH.

timothypratley commented 7 years ago

oooo nice! That's great :) Yes I think handling both cases would be useful for backwards compatibility.

Deraen commented 7 years ago

I don't see much value in generating deps.cljs in most of the cases, it is just as easy, or easier to write the deps.cljs by hand.

Simple deps.cljs: https://github.com/cljsjs/packages/blob/master/preact-compat/resources/deps.cljs Additional entries generated from custom task: https://github.com/cljsjs/packages/blob/master/highlight/build.boot#L25-L41

I added note about limits of deps-cljs to packaging wiki: https://github.com/cljsjs/packages/wiki/Creating-Packages/_compare/414c39462f49e9b1cfb533b61658a30e964ecd79...2ec7521f6d0614edf4eb74f11ab762a68ff9f722