【发布时间】:2015-08-05 06:38:10
【问题描述】:
我已经安装了 bootstrap-sass 和 grunt-sass,并且想要自定义包含在我的构建中的引导组件。
我在 app/styles/ 文件夹中创建了 _bootstrap.scss 的副本,需要覆盖默认导入路径 - 我需要对 Gruntfile 进行哪些更改才能使其正常工作?
我已经尝试在我的 _bootstrap.scss 文件中包含 Bootstrap 部分的完整路径,但这无法编译。 Gruntfile 提取如下。
Gruntfile
// Compiles Sass to CSS and generates necessary files if requested
sass: {
options: {
sourceMap: true,
sourceMapEmbed: true,
sourceMapContents: true,
includePaths: ['.']
},
dist: {
files: [{
expand: true,
cwd: '<%= config.app %>/styles',
src: ['*.{scss,sass}'],
dest: '.tmp/styles',
ext: '.css'
}]
},
server: {
files: [{
expand: true,
cwd: '<%= config.app %>/styles',
src: ['*.{scss,sass}'],
dest: '.tmp/styles',
ext: '.css'
}]
}
},
【问题讨论】:
-
不太清楚您要完成什么。你能把它分解成更小的部分吗?
-
我已经安装了 bootstrap-sass 但只想包含特定的组件。我不想修改包源,我想在我的项目中使用我自己版本的 _bootstrap.scss - 我可以设置加载路径吗?
标签: gruntjs bower bootstrap-sass