我使用了 Bootstrap 定制器工具:http://getbootstrap.com/customize/ http://getbootstrap.com/customize/它生成一个config.json
每当我需要进行更改时我都会重复使用的文件。
我使用 Bower 来处理除 Bootstrap 之外的所有依赖项,因为我需要自定义版本。
有没有办法让 Bower 使用我的config.json
文件来生成CSS?
这个问题的所选答案似乎表明这实际上是可能的,但它没有提供太多细节,而且我在任何地方都找不到任何其他相关内容:Twitter Bootstraps config.json - 它有什么作用? https://stackoverflow.com/questions/21433655/twitter-bootstraps-config-json-what-does-it-do
我还发现这个包可以让你使用自己的 LESS 文件自定义 Bootstrap,但这不是我所做的,而且它似乎没有使用config.json
file: https://www.npmjs.org/package/grunt-customize-bootstrap https://www.npmjs.org/package/grunt-customize-bootstrap
Thanks!
如果需要,您可以使用 Bower 安装 bootstrap-sass-official 或 less 版本
正如这里所述https://github.com/twbs/bootstrap-sass#sass https://github.com/twbs/bootstrap-sass#sass
您可以导入 bootstrap-custom 并注释掉不需要的组件。
我和你有同样的问题,这就是我的 bootstrap-custom.scss 文件的样子
@import "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/variables";
@import "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/mixins";
...
@import "bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/responsive-utilities";
在我的 default.scss 文件中我放入了
@import "bootstrap";
然后编译!
PS:我想在评论中指出链接,但需要 50 声誉点:(
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)