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

2019-08-31 21:58发布

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

enter image description here

标签: bower gulp
1条回答
Viruses.
2楼-- · 2019-08-31 22:21

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"
}
查看更多
登录 后发表回答