1
mirror of https://github.com/pure-css/pure synced 2024-11-22 05:32:20 +01:00
pure/tasks/suppress.js
2013-11-18 14:45:37 -05:00

22 lines
534 B
JavaScript

'use strict';
module.exports = function (grunt) {
grunt.registerTask('suppress', 'Suppresses noisy logs', function () {
var allowed = ['success', 'fail', 'warn', 'error'];
grunt.util.hooker.hook(grunt.log, {
passName: true,
pre: function (name) {
if (allowed.indexOf(name) === -1) {
grunt.log.muted = true;
}
},
post: function () {
grunt.log.muted = false;
}
});
});
};