Install Bower components into two different directories?(将 Bower 组件安装到两个不同的目录中?)
问题描述
在使用 CSS 和 JS 组件时,是否有可能,甚至,将它们安装到不同的目录是否有意义?
When using CSS and JS components, is it possible, or even, does it make sense to install them to different directories?
.
|-- app
|-- scripts
|-- components # js components go here
|-- backbone-amd
|-- etc
|-- styles
|-- modules
|-- partials
|-- components # sass components go here
|-- normalize.scss
|-- etc
以这种方式组织项目的最有效方式是什么?是否有一个很好的 Grunt 任务来实现为开发环境集成 bower 安装的 sass 组件的目标?
What's the most efficient way to structure a project organized as such? Is there a good Grunt task to accomplish the goal of integrating bower installed sass components for a development environment?
推荐答案
Bower 需要跟踪您安装的每个组件.如果他们分散在多个位置,那将非常困难.对于 Sass 开发,只需将 components 文件夹放在 Sass 搜索路径中即可.
Bower needs to keep track of every component you install. That would be very hard if they were split up in multiple locations. For Sass development, just put the components folder in the Sass search path.
如果您坚持这样做,有 grunt 任务可以帮助您拆分它:
There are grunt tasks that can assist you in splitting it up if you insist on doing that:
(虽然不推荐)
- grunt-bower-task
- grunt-bower-organiser
- grunt-bower
这篇关于将 Bower 组件安装到两个不同的目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 Bower 组件安装到两个不同的目录中?


基础教程推荐
- 用于 Twitter 小部件宽度的 HTML/CSS 2022-01-01
- 如何使用JIT在顺风css中使用布局变体? 2022-01-01
- 我可以在浏览器中与Babel一起使用ES模块,而不捆绑我的代码吗? 2022-01-01
- Electron 将 Node.js 和 Chromium 上下文结合起来意味着 2022-01-01
- 如何使用TypeScrip将固定承诺数组中的项设置为可选 2022-01-01
- 自定义 XMLHttpRequest.prototype.open 2022-01-01
- Chart.js 在线性图表上拖动点 2022-01-01
- html表格如何通过更改悬停边框来突出显示列? 2022-01-01
- Vue 3 – <过渡>渲染不能动画的非元素根节点 2022-01-01
- 直接将值设置为滑块 2022-01-01