Created
July 3, 2014 13:36
-
-
Save philmander/7e44b0049c4dfbc3154c to your computer and use it in GitHub Desktop.
Litlle function for concatenating file names in gulp
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
//little util to do tidier directory concatenation | |
function dir() { | |
var args = Array.prototype.slice.call(arguments); | |
var prefix = ""; | |
if(args[0] === "!") { | |
prefix = args[0]; | |
args.shift(); | |
} | |
return prefix + args.join("/"); | |
} | |
//usage | |
var dirs = { | |
js: "./src" | |
}; | |
gulp.src(dir(dirs.js, '**/*.js')); | |
gulp.src(dir("!", dirs.js, '**/*.js')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment