Skip to content
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

Feature request: Can I get availability for saving generated bower.json and .bowerrc? #13

Open
DeLaGuardo opened this issue Aug 8, 2014 · 1 comment

Comments

@DeLaGuardo
Copy link

Now it is impossible to start postnatal scripts that required bower.json

:bower {:scripts {:postinstall "./node_modules/.bin/wiredep -s resources/public/index.html"}}

This script rise error.

@DeLaGuardo DeLaGuardo changed the title Feature request: Can I get availability for saving generated bower.son and .bowerrc? Feature request: Can I get availability for saving generated bower.json and .bowerrc? Aug 8, 2014
@radhikalism
Copy link
Contributor

Can you describe what error you get?

It's not pretty, but I am able to make wiredep work with something like this:

  :plugins [[lein-bower "0.5.1"]
            [lein-npm "0.4.0"]]
  :node-dependencies [[wiredep "1.8.5"]
                      [bower "1.3.10"]]
  :bower {:scripts {:postinstall "./node_modules/.bin/wiredep -d resources/public/vendor/ -s resources/public/index.html"}}
  :bower-dependencies [[jquery "2.1.1"]]

With that:

$ lein bower install jquery
bower jquery#2.1.1              cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#2.1.1            validate 2.1.1 against git://github.com/jquery/jquery.git#2.1.1
bower jquery#*                  cached git://github.com/jquery/jquery.git#2.1.1
bower jquery#*                validate 2.1.1 against git://github.com/jquery/jquery.git#*
bower jquery#2.1.1             install jquery#2.1.1
bower                      postinstall ./node_modules/.bin/wiredep -d resources/public/vendor/ -s resources/public/index.html
bower                      postinstall resources/public/index.html modified.

I guess the two things to keep in mind are that bower should be run indirectly with lein bower so that bower.json is available in the environment, and that your bower dependencies should be declared statically in your project.clj before you run lein bower install (since --save won't persist and lein-bower doesn't have an equivalent yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants