如何使用gulp-bower以及它是为了什么? [英] How is gulp-bower used and what is it for?

查看:297
本文介绍了如何使用gulp-bower以及它是为了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解决这个问题的;显然,当我使用我的 gulp 文件时,我无法链接到我的bower_components文件夹。



在尝试提出解决方案时,我听说过 gulp-bower 但是这些文档似乎有些模糊。那么,咕噜咕噜是什么用的?这可以帮助我吗?

任何人遇到我的问题?我的gulp文件太冗长了......

就像我设置一个包含index,scss,images和js的组件文件夹,我用gulp流DEV或PROD视情况而定。但是,唉,我认为这可能是问题......



路径结构

解决方案

div>

这应该是对原始问题的回答,但也适用于此。

您无法请参阅位于Web服务器服务目录之上的脚本。
然而你可以链接到它,如果你在linux上,那将是一个 ln -s



但是,还有更好的方法。将 .bowerrc 添加到您安装您的bower组件的位置,并将其添加到它:

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


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

解决方案

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"
}

这篇关于如何使用gulp-bower以及它是为了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆