【发布时间】:2015-03-18 18:25:50
【问题描述】:
我使用 https://github.com/Swiip/generator-gulp-angular 来样板化我的 angularjs 应用程序。
我发现 bootswatch 主题很平坦,想使用它并从 [http://bootswatch.com/flatly/][2] 两个文件下载,_variables.scss 和 _bootswatch.scss。
我将这两个文件添加到我的 vendor.scss
$icon-font-path: "../../bower_components/bootstrap-sass-official/assets/fonts/bootstrap/";
@import '../../bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap';
@import "flatly/variables";
@import "flatly/bootswatch";
使用gulp serve,我构建了我的应用程序并在控制台上显示了它。
project developer$ gulp serve
[21:28:41] Using gulpfile /Volumes/Developer/angularjs/project/gulpfile.js
[21:28:41] Starting 'styles'...
[21:28:42] gulp-inject 2 files into index.scss.
stream.js:94
throw er; // Unhandled stream error in pipe.
^
Error: /Volumes/Developer/angularjs/project/src/app/flatly/_bootswatch.scss:16: error: unbound variable $navbar-default-bg
[1]: https://github.com/Swiip/generator-gulp-angular
[2]: http://bootswatch.com/flatly/
为什么unbound variable $navbar-default-bg 但$navbar-default-bg 存在于_variables.scss 文件中。
$navbar-default-bg: $brand-primary;
我的项目结构:
【问题讨论】:
标签: css angularjs twitter-bootstrap sass