chlorinejs / lein-bower

Leiningen plugin for managing Bower dependencies in Clojure projects
66 stars 13 forks source link

Deprecated filename component.json #1

Closed radhikalism closed 10 years ago

radhikalism commented 10 years ago

When using bower >=0.9, the package metadata file should be called bower.json, instead of component.json. Running lein bower install with bower 1.2.8 generates this deprecation warning:

bower                       deprecated You are using the deprecated component.json file

I'd recommend just switching references of "component.json" to "bower.json" in bower.clj, as bower <0.9 is relatively old.

If lein-bower should support legacy versions too, perhaps it can be configurable in project.clj? This is what I proposed in bodil/lein-npm#2 when bower functionality was there, allowing :bower-file "component.json" to override the default filename of bower.json.

Thoughts?

myguidingstar-zz commented 10 years ago

I totally agree. Btw, I think these configs should be moved into a single key :bower in project.clj. Something like this:

:bower {:dependencies [] :path "resources/public/js/lib" :config-file  "bower.json"}

and PRs are welcomed

myguidingstar-zz commented 10 years ago

Yes, I agree to keep :bower-dependencies.

I can't merge your PR this time. I think you don't need to use dynamic binding, because project is passed to all functions. You can extract those settings from that - and get or get-in functions allow you to have default values in case given keys are not found.

Btw, remember to update README according to.