Navigation Menu

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

Wiredep and bower components #126

Closed
agent-john opened this issue Apr 14, 2015 · 5 comments
Closed

Wiredep and bower components #126

agent-john opened this issue Apr 14, 2015 · 5 comments

Comments

@agent-john
Copy link

Hi.
I would like to change bower_components path and add "/" before url, when wiredep put all .js files into jade template.
I tried to do this in wiredep.js but it does not work.
I would like to chenge from:
// bower:js
script(src='bower_components/jquery/dist/jquery.js')

to:
// bower:js
script(src='/bower_components/jquery/dist/jquery.js')

   fileTypes: {
      jade: {
        replace: {
          js: 'script(src=\'/{{filePath}}\')',
          css: 'link(rel=\'stylesheet\', href=\'/{{filePath}}\')'
        }
      }

It should work, but it is not.
Could you help ?

@stephenplusplus
Copy link
Owner

It worked as expected for me in testing. Can you try un- and re-installing grunt-wiredep to be sure you're using the latest wiredep?

@agent-john
Copy link
Author

I did it, but without effect :(

@stephenplusplus
Copy link
Owner

What OS/platform are you running? Can you do a triple check that you're using the latest wiredep?

It's the worst when something works for you and not for someone else, isn't it? 😢

@CWSpear
Copy link

CWSpear commented May 22, 2015

This definitely should be working, but I do want to point out that I prefer the pattern of putting my relative assets in my link and script tags (and a and img tags, etc) and then adding <base href="/" /> to my <head>.

Ya know... cuz that one time 5 years ago when I had a project where they put me in a subdirectory mid-project and if I had done that, all I would have had to do was update the base and it all would have worked, but I didn't, and I had update all the links in the entire project! And so now I do it by default all the time! haha...

@eddiemonge
Copy link
Collaborator

closing since this is old and should be in other places like wiredep

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

No branches or pull requests

4 participants