How is gulp-bower used and what is it for?

和自甴很熟 提交于 2020-01-06 18:10:50

问题


I am trying to solve this problem; Apparently when I use my gulp file I can't link to my bower_components folder.

While trying to come up with a solution, I heard of gulp-bower But the docs seem a little vague. So what is gulp-bower used for? Could this help me?

Anyone run into my problem? Is my gulp file too verbose...

Just as a FYI I set up a components folder which houses index, scss, images and js and I use gulp to stream to a DEV or PROD depending on the situation. But alas I think that maybe the problem...

PATH STRUCTURE


回答1:


This was supposed to be an answer to your original question, but it's suitable here as well.

You can't refer to scripts that are out on top of serving directory of your web server. You could however link to it, if you're on linux, that would be a ln -s.

But, there's a better way. Add .bowerrc to where you install your bower components from, and add this to it:

{
 "directory": "folder/in/a/serving/directory"
}


来源:https://stackoverflow.com/questions/25629491/how-is-gulp-bower-used-and-what-is-it-for

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!