I think you also need to include sassDir
and cssDir
in your compass options:
compass: {
options: {
config: 'config.rb',
sassDir: 'path/to/source/sass',
cssDir: 'path/to/public/css'
}
}
I'm not sure though as all of your config is in config.rb
which you haven't included! ;)
EDIT
You included this in your config.rb
so I'm not sure what's going on now. Perhaps try registering this task as a debugging method:
grunt.registerTask('debug', 'debug logging', function() {
grunt.log.writeln('scss watch triggered');
});
Then change the tasks: ['compass']
line to launch the 'debug'
task instead. Then change a SCSS file to see if it triggers the task. If not, then it must be an issue with your php:watch
configuration?
EDIT 2
You don't have a watch
task currently, just a php:watch
task. watch
is the task that actually does the monitoring via grunt-watch-contrib
, then you can also trigger the php:watch
task using the line you already have: grunt.registerTask('phpwatch', ['php:watch', 'watch']);
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
options: {
config: 'config.rb',
}
},
php: {
options: {
port: 8000,
keepalive: true,
open: true,
base: 'public_html/',
hostname: 'localhost'
},
watch: {
options: {
livereload: 8000
}
}
watch:{
scss: {
files: '**/*.scss',
tasks: ['compass'],
options: {
livereload: false
}
},
css: {
files: '**/*.css',
tasks: [],
options: {
livereload: 8000
}
}
}
}
});
}
P.S. there maybe an extra or a missing }
- it's making me go dizzy trying to count!