I want to generate .css partial files from the corresponding .less files
I use the latest versions available from npm, grunt@0.4.0, grunt-contrib-less@0.5.0
You'd want to read the Building the files object dynamically section in the docs.
This would be a direct translation from your current config:
module.exports = function (grunt) {
grunt.initConfig({
less: {
development: {
files: [{
expand: true, // Enable dynamic expansion.
cwd: 'htdocs/less', // Src matches are relative to this path.
src: ['*.less'], // Actual pattern(s) to match.
dest: 'htdocs/css', // Destination path prefix.
ext: '.css', // Dest filepaths will have this extension.
}]
}
},
});
};