Created
February 17, 2014 23:03
-
-
Save aaronpowell/9061025 to your computer and use it in GitHub Desktop.
Grunt task for checking out files from TFVC
This file contains 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
var tfPath = 'C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\TF.exe'; | |
grunt.registerTask('tf-checkout', 'Checks out a location from TFS', function (path, recursive) { | |
var cb = this.async(); | |
var recursiveFlag = recursive ? '/recursive' : ''; | |
var child = grunt.util.spawn({ | |
cmd: tfPath, | |
args: ['checkout', path, recursiveFlag] | |
}, function (err, result, code) { | |
if (err) { | |
grunt.fatal(err); | |
} | |
cb(); | |
}); | |
child.stdout.pipe(process.stdout); | |
child.stderr.pipe(process.stderr); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how to pass multiple "path" arguments to this task?
My assets located
/assets/stylesheets/less
/assets/scripts/vendors
and so on.