【发布时间】:2015-04-09 23:43:08
【问题描述】:
我的 grunt-contrib-compass 似乎无法正常工作, 我正在尝试使用:
grunt compass:dev
输出是:
Running "compass:dev" (compass) task
但是什么也没发生,我也没有出错
在我的Gruntfile.js 我有:
compass: {
dev: {
options: {
sassDir: 'src/assets/sass',
cssDir: 'src/assets/css',
imagesDir: 'assets/images',
outputStyle: 'nested',
environment: 'development',
force: true
}
},
dist: {
options: {
sassDir: 'src/assets/sass',
cssDir: 'src/assets/css',
imagesDir: 'assets/images',
outputStyle: 'compressed',
noLineComments: true,
environment: 'production'
}
}
}
使用:
grunt compass:dev --verbose
我明白了:
Running "compass:dev" (compass) task
Verifying property compass.dev exists in config...OK
File: [no files]
Options: sassDir="src/assets/sass/", cssDir="src/assets/css",` imagesDir="assets/images", outputStyle="nested", environment="development",`
有什么想法吗?
谢谢!
【问题讨论】:
-
使用详细标志 (
grunt compass:dev --verbose) 运行任务时的输出是什么? -
这是我的输出结果:
Running "compass:dev" (compass) task Verifying property compass.dev exists in config...OK File: [no files] Options: sassDir="src/assets/sass/", cssDir="src/assets/css", imagesDir="assets/images", outputStyle="nested", environment="development", force -
看来是路径问题 - 它没有找到任何文件。
-
是的,它看起来是,但我在
src/assets/sass/上获得了.sass文件,刚刚检查过 -
这是 ruby 版本的问题,我将我的 ruby 版本更改为
ruby-2.2.0-preview1,现在可以了 :)
标签: sass gruntjs compass grunt-contrib-compass