From: Jörn Zaefferer Date: Fri, 9 Mar 2012 15:23:57 +0000 (+0100) Subject: Build/grunt: Use custom directive to strip banners. Now works against unmodified... X-Git-Tag: 1.9.0m8~201 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8a982f59685ce623b9d600c5d53ae4511e2ae5ce;p=jquery-ui.git Build/grunt: Use custom directive to strip banners. Now works against unmodified grunt again. --- diff --git a/grunt.js b/grunt.js index 0aff5a963..b60ac9e67 100644 --- a/grunt.js +++ b/grunt.js @@ -1,7 +1,7 @@ /*global config:true, task:true*/ function stripBanner(files) { return files.map(function(file) { - return ''; + return ''; }); } function stripDirectory(file) { @@ -19,6 +19,9 @@ function createBanner(files) { } // allow access from banner template global.stripDirectory = stripDirectory; +task.registerHelper('strip_all_banners', function(filepath) { + return file.read(filepath).replace(/^\s*\/\*[\s\S]*?\*\/\s*/g, ''); +}); 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 uiFiles = coreFiles.map(function(file) {