mirror of
https://github.com/pure-css/pure.git
synced 2024-11-07 21:34:24 +00:00
19 lines
601 B
JavaScript
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.');
|
||
|
});
|
||
|
};
|