https://github.com/danactive/grunt-tfs-unlock
Grunt.js plugin to checkout Windows TFS locked files with Team Foundation Server
https://github.com/danactive/grunt-tfs-unlock
Last synced: 3 months ago
JSON representation
Grunt.js plugin to checkout Windows TFS locked files with Team Foundation Server
- Host: GitHub
- URL: https://github.com/danactive/grunt-tfs-unlock
- Owner: danactive
- License: mit
- Created: 2013-05-09T01:06:31.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2020-03-17T03:04:18.000Z (about 6 years ago)
- Last Synced: 2026-01-11T15:27:27.579Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 7
- Watchers: 2
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# grunt-tfs-unlock
[](http://badge.fury.io/js/grunt-tfs-unlock)
[](https://david-dm.org/danactive/grunt-tfs-unlock)
[](https://david-dm.org/danactive/grunt-tfs-unlock#info=devDependencies)
[](http://opensource.org/licenses/MIT)
> Checkout Windows TFS locked files with Team Foundation Server
## Getting Started
```shell
npm install grunt-tfs-unlock --save-dev
```
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
```js
grunt.loadNpmTasks('grunt-tfs-unlock');
```
## The "tfs-unlock" task
### Overview
In your project's Gruntfile, add a section named `tfs-unlock` to the data object passed into `grunt.initConfig()`.
```js
grunt.initConfig({
tfs-unlock: {
options: {
// Task-specific options go here.
},
your_target: {
// Target-specific file lists and/or options go here.
},
},
})
```
### Options
#### options.action
Type: `String`
Default value: `checkout`
The TFS command applied to the target files. Checkout or undo are currently supported
#### options.tfsPath
Type: `String` || `Array of Strings`
Todo: Improve enumeration, but for now pass a Windows shell path to parent location of `tf.exe`. String path the Visual Studio folder, or use the enumerated array. First index is Visual Studio version number vs2008, vs2010, vs2012, vs2013. Second index is software bit bit32, or bit64.
#### options.wait
Type: `Number`
Default value: 3
Set the sleep duration for the TFS command to finish its work.
### Usage Examples
#### Visual Studio 2010 64-bit Options
```js
grunt.initConfig({
"tfs-unlock": {
checkout: {
options: {
tfsPath: ["vs2010", "bit64"], // optional
action: 'checkout'
},
files: {
src: []
}
},
undo: {
options: {
tfsPath: ["vs2010", "bit64"],
action: 'undo'
},
files: {
src: []
}
}
}
})
```
## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
## Release History
* 2016-05-15 v0.4.0 Update dependencies and dev-dependencies
* 2015-03-11 v0.3.2 Improve error catching
* 2015-03-11 v0.3.1 tfsPath is optional
* 2015-02-16 v0.3.0 Update tfs-unlock dependency to v.0.3.x
* 2015-01-24 v0.2.0 Update tfs-unlock dependency to v.0.2.0
* 2013-06-02 v0.1.2 Add sleep for TFS to complete command
* 2013-06-02 v0.1.1 Fix dependencies
* 2013-06-02 v0.1.0 First stable release to npm