将Bower组件安装到两个不同的目录中? [英] Install Bower components into two different directories?
问题描述
使用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.
有艰巨的任务,如果您坚持要这样做,可以帮助您进行拆分:
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组件安装到两个不同的目录中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!