I’ve attempted to get my source maps running with Chrome (latest version on Mac OS 10.8.5) with this grunt config, locally using MAMP:
},
less: {
dist: {
files: {
'assets/css/main.min.css': [
'assets/less/app.less'
]
},
options: {
compress: true,
// LESS source map
// To enable, set sourceMap to true and update sourceMapRootpath based on your install
sourceMap: true,
sourceMapFilename: 'assets/css/main.min.css.map',
sourceMapRootpath: '/wp-content/themes/roots-master/'
}
}
},
When this is saved, this is returned:
>> File "Gruntfile.js" changed.
Running "jshint:all" (jshint) task
>> 2 files lint free.
Running "uglify:dist" (uglify) task
File "assets/js/scripts.min.js" created.
Running "version" task
Versioning assets/css/main.min.css...OK
Versioning assets/js/scripts.min.js...OK
"lib/scripts.php" updated with new CSS/JS versions.
Done, without errors.
Completed in 1.016s at Sat Nov 30 2013 21:25:26 GMT-1000 (HST) - Waiting...
OK
>> File "assets/js/scripts.min.js" changed.
I was told this could not be debugged until the .map file is created.
I’m wondering if my case is “special” because of a kink when installing Roots. I went ahead and ran the npm install before I properly installed Wordpress. Realizing my oversight, I trashed the roots folder and finished my local install of WP.
I then restarted and npm installed, and everything was working perfectly - until this. I looked on grunt.jss and less.js on github and found only one article.
This looks promising, but Grunt is not mentioned.
http://robdodson.me/blog/2012/12/28/debug-less-with-chrome-developer-tools/
$ lessc --version
this is returned:
-bash: lessc: command not found
Would installing LESS over it screw me over royally?