diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-09 16:23:57 +0100 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-03-09 16:23:57 +0100 |
commit | 8a982f59685ce623b9d600c5d53ae4511e2ae5ce (patch) | |
tree | 7c49d3f53f508809c59c3685c156cb24066bec12 /grunt.js | |
parent | 36302cc3c98d41d2142b177ecbb29d3980393103 (diff) | |
download | jquery-ui-8a982f59685ce623b9d600c5d53ae4511e2ae5ce.tar.gz jquery-ui-8a982f59685ce623b9d600c5d53ae4511e2ae5ce.zip |
Build/grunt: Use custom directive to strip banners. Now works against unmodified grunt again.
Diffstat (limited to 'grunt.js')
-rw-r--r-- | grunt.js | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,7 +1,7 @@ /*global config:true, task:true*/ function stripBanner(files) { return files.map(function(file) { - return '<file_strip_banner:' + file + '>'; + return '<strip_all_banners:' + file + '>'; }); } 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) { |