Reputation: 49
Trying to learn Grunt. I have installed the grunt-contrib-compass
,and grunt-contrib-watch
plugins. When I use grunt
in terminal, it runs the compass task and comes back with
Running "compass:dist" (compass) task
Compass can't find any Sass files to compile.
Is your compass configuration correct?.
If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.`
The Gruntfile is in the wp-content/
folder of my Wordpress install. Here is the compass setup in my Grunfile:
compass: {
dist: {
options: {
config: 'themes/THEME-NAME/config.rb',
force: true
}
}
},
My config.rb is there, and is setup thusly:
require 'singularitygs'
require "breakpoint"
http_path = "/"
css_dir = "/"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
output_style = :compressed
line_comments = false
Any ideas? Where have I gone wrong?
Upvotes: 0
Views: 9383
Reputation: 1175
I also have this issue with my first sass project when I wanted to use Susy toolkit. You should type "compass watch" command from your working directory, and compass will do the rest. And then compile the main.scss file. If it shows like below...
modified C:/xampp/htdocs/projects/sass/config.rb
clean C:/xampp/htdocs/projects/sass/css
delete C:/xampp/htdocs/projects/sass/css/main.css
write C:/xampp/htdocs/projects/sass/css/main.css
Then it's working. But at first, you have to configure your config.rb file.
Upvotes: 0
Reputation: 163
I had this problem also, you don't have to change the css or sass dir paths in config.rb, all you do is set the basePath
in Gruntfile.js - this tells compass where to run from, otherwise it defaults to the same directory as your Grunfile, which is clearly wrong.
The docs are here: https://github.com/gruntjs/grunt-contrib-compass
compass: {
uikit: {
options: {
config: 'styles/uikit/config.rb',
basePath: 'styles/uikit',
bundleExec: true
}
}
}
Upvotes: 4
Reputation: 49
APPARENTLY when you use a config.rb in another directory, set your config.rb's variable paths relative to the Gruntfile's directory and it should all work.
Upvotes: 1