简体   繁体   中英

How can one manage front-end library dependencies in Clojure?

I have a Clojure Ring/Compojure web project with Javascript front-end. I want to use Bootstrap CSS library for the front-end. Right now i'd download it and put into resources/public/lib/bootstrap . But it would be nice to manage JS/CSS libs similarly to :dependencies list in project.clj . How can this be achieved?

Thanks!

Bower fulfils my requirements. Prerequisites are installing Bower through NPM and lein-bower Leiningen plugin. Below are the configuration details I had to add to project.clj :

:plugins [[lein-bower "0.5.1"]]
:bower-dependencies [[bootstrap "3.3.2"]]
:bower {:directory "resources/public/lib"}

@Aleš Roubíček - thanks for your comment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM