From 7c66de575acaec03ed7f54c2327474437d0c0624 Mon Sep 17 00:00:00 2001 From: "Richard D. Worth" Date: Wed, 20 Jun 2012 11:56:15 -0400 Subject: [PATCH] Support nested resources in build-resources task --- tasks/build.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks/build.js b/tasks/build.js index 9b1c0bc..5e7d0b5 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -75,7 +75,9 @@ grunt.registerMultiTask( "build-resources", "Copy resources", function() { grunt.file.mkdir( targetDir ); grunt.utils.async.forEachSeries( files, function( fileName, fileDone ) { - grunt.file.copy( fileName, targetDir + path.basename( fileName ) ); + var targetFileName = targetDir + fileName.replace( /^.+?\//, "" ); + + grunt.file.copy( fileName, targetFileName ); fileDone(); }, function() { if ( task.errorCount ) {