1
mirror of https://github.com/pure-css/pure synced 2024-12-16 23:25:53 +01:00
pure/tasks/license.js
2013-11-18 14:45:37 -05:00

19 lines
601 B
JavaScript

'use strict';
module.exports = function (grunt) {
grunt.registerMultiTask('license', 'Stamps license banners on files.', function () {
var options = this.options({banner: ''}),
banner = grunt.template.process(options.banner),
tally = 0;
this.files.forEach(function (filePair) {
filePair.src.forEach(function (file) {
grunt.file.write(file, banner + grunt.file.read(file));
tally += 1;
});
});
grunt.log.writeln('Stamped license on ' + String(tally).cyan + ' files.');
});
};