win-tfs
Version:
Windows Team Foundation Server(TFS) version control via Node.js
44 lines (31 loc) • 969 B
Markdown
* No dependencies
* Easy API
* Intuitive
* License: ISC
[](https://npmjs.org/packages/win-tfs/)
```javascript
npm install win-tfs
```
```javascript
var tfs = require('win-tfs'),
path = require('path'),
basePath = path.resolve('C:/User/suprsidr/project/files/'),
exe = tfs.findVisualStudioPath() + 'tf.exe';
var paths = [
path.join(basePath, 'file.json'),
path.join(basePath, 'file.js')
];
var params = ['/login:tfsusername@domain,PASSWORD', '/comment:Updated from nodejs', '/noprompt'];
// get latest
tfs.get(exe, paths, params);
// checkout
tfs.checkout(exe, paths, params);
// checkin
tfs.checkin(exe, paths, params);
// undo checkout
tfs.undo(exe, paths, params);
```
All commands: get, add, delete, undelete, checkout, checkin, undo, rollback, history, workflod