Skip to content

Instantly share code, notes, and snippets.

@aaronpowell
Created February 17, 2014 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpowell/9061025 to your computer and use it in GitHub Desktop.
Save aaronpowell/9061025 to your computer and use it in GitHub Desktop.
Grunt task for checking out files from TFVC
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);
});
@Kjaer
Copy link

Kjaer commented Oct 12, 2014

how to pass multiple "path" arguments to this task?
My assets located
/assets/stylesheets/less
/assets/scripts/vendors
and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment