Last active
December 11, 2015 08:58
-
-
Save ahomu/4576519 to your computer and use it in GitHub Desktop.
0.4.0rc系で削除されたので、応急処置的にgrunt.file.expandFilesを復活させるときのサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 自作タスクの中だけの場合 | |
// usage: `expandFiles(patternString)` | |
var expandFiles; | |
if (grunt.file.expandFiles) { | |
expandFiles = grunt.file.expandFiles; | |
} else { | |
expandFiles = function(filesPattern) { | |
return grunt.file.expand({filter: 'isFile'}, filesPattern); | |
}; | |
} | |
//=============================================================== | |
// Gruntfile.js内で一括してやっちゃう場合 | |
// 冒頭でgrunt.file.expandFilesを埋める | |
if (!grunt.file.expandFiles) { | |
grunt.file.expandFiles = function(filesPattern) { | |
return grunt.file.expand({filter: 'isFile'}, filesPattern); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment