だから私は次のような状況にあります。CLI からのみコンパスを使用している場合、コンパスは機能し、必要なことを正確に実行します。ファイルが置かcompass compile
れているのと同じフォルダー (フォルダー内) から実行しています。また、ディレクトリも含まれています。これが私のファイルです:config.rb
styles
sass
css
config.rb
project_path = '.'
css_dir = "css"
sass_dir = "sass"
images_dir = "../../data/images"
javascripts_dir = "../scripts"
output_style = :compressed
environment = :development
relative_assets = true
これに使用しようとしているときはgrunt
、次の構成を使用しますGruntfile.js
。
compass: {
compile: {
options: {
basePath: 'app/src/styles',
config: 'app/src/styles/config.rb'
}
}
}
app
フォルダとはGruntfile.js
同じレベルにあります。実行するgrunt compass
と、次の出力が表示されます。
Running "compass:dist" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.
Done, without errors.
すべてのオプションを直接指定しようとすると、次のようになります。
compass: {
compile: {
options: {
basePath: 'app/src/styles',
sassDir: 'app/src/styles/sass',
cssDir: 'app/src/styles/css',
imagesDir: 'app/data/images'
}
}
}
それは仕事をしますが、.sass-cache
フォルダーはのレベルで作成されますGruntfile.js
。basePath
したがって、構成のオプションに問題があると思います。
私は何か間違ったことをしていますか?
編集:唯一の方法は、ファイルを のレベルに
移動し、次のオプションを指定することです。config.rb
Gruntfile.js
project_path = 'app/src/styles'
css_dir = "css"
sass_dir = "sass"
images_dir = "../../data/images"
javascripts_dir = "../scripts"
output_style = :compressed
environment = :development
relative_assets = true
また、このタスクに関する「Gruntfile.js」からすべてのオプションを削除しました。ここで何が起こっているのか、まだわかりません。