From 3cb276c4678cd4f2a1a8aec8e3cbf184b06c9251 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=CC=88rn=20Zaefferer?= Date: Fri, 2 Mar 2012 16:55:49 +0100 Subject: [PATCH] Add list of included files to min banner --- grunt.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/grunt.js b/grunt.js index b935a0bc7..0b3f13874 100644 --- a/grunt.js +++ b/grunt.js @@ -1,21 +1,26 @@ /*global config:true, task:true*/ var coreFiles = 'jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.effects.core.js'.split(', '); +var allFiles = coreFiles.map(function(file) { + return 'ui/' + file; +}).concat(file.expand('ui/*.js').filter(function(file) { + return coreFiles.indexOf(file.substring(3)) === -1; +})); +var rawList = allFiles.map(function(file) { + return file.substring(3); +}); config.init({ pkg: '', meta: { banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + '<%= template.today("m/d/yyyy") %>\n' + '<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' + + // TODO makes this banner only useful for the min-all task below... + '* Includes: ' + rawList.join(', ') + '\n' + '* Copyright (c) <%= template.today("yyyy") %> <%= pkg.author.name %>;' + ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */' }, concat: { - // 'dist/ui/jquery-ui.js': ['', ''] - 'dist/jquery-ui.js': coreFiles.map(function(file) { - return 'ui/' + file; - }).concat(file.expand('ui/*.js').filter(function(file) { - return coreFiles.indexOf(file.substring(3)) === -1; - })) + 'dist/jquery-ui.js': allFiles }, min: { 'dist/jquery-ui.min.js': ['', 'dist/jquery-ui.js'] -- 2.39.5