Skip to content
Permalink
Browse files

Add list of included files to min banner

  • Loading branch information
jzaefferer committed Mar 2, 2012
1 parent 69dcb76 commit 3cb276c4678cd4f2a1a8aec8e3cbf184b06c9251
Showing with 11 additions and 6 deletions.
  1. +11 −6 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: '<json:package.json>',
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': ['<banner>', '<file_strip_banner: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': ['<banner>', 'dist/jquery-ui.js']

0 comments on commit 3cb276c

Please sign in to comment.
You can’t perform that action at this time.