I am using grunt-postcss in my gruntfile.js and everything works fine except the postcss-bem-linter which should log warning in the console if the BEM rules are not followed. Here a snippet of configuration in gruntfile.js:
var preprocessorsAfterSprites = [
require('postcss-bem-linter')(function (a) {
console.log(a);
}), // this just doesn't want to work right now
require('postcss-reporter')
];
function getPostCssPreprocessors(name) {
return preprocessorsAfterSprites;
}
grunt.initConfig({
postcss: {
options: {
map: { inline: false }
},
golden: {
src: '<%= dirs.pcss %>/golden/main.scss',
dest: '<%= dirs.css %>/golden.css',
options: {
processors: getPostCssPreprocessors('golden')
}
}
}
});
When I try to type grunt postcss:golden I dont have any output from the console log. Any ideas why?