Merge pull request #4989 from stpettersens/master

Type definitions and tests for git-config
This commit is contained in:
Masahiro Wakame
2015-07-20 20:40:52 +09:00
3 changed files with 22 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
/// <reference path="git-config.d.ts" />
import gitConfig = require('git-config');
var config: Object = gitConfig.sync();
console.log(JSON.stringify(config));
config = gitConfig.sync('gitconfig');
console.log(JSON.stringify(config));
+8
View File
@@ -0,0 +1,8 @@
// Type definitions for git-config
// Project: https://github.com/eugeneware/git-config
// Definitions by: Sam Saint-Pettersen <https://github.com/stpettersens>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "git-config" {
export function sync(gitFile?: string): Object; // Synchronous version.
}
+5
View File
@@ -0,0 +1,5 @@
[user]
name = A Git User
email = git.user@domain.xyz
[push]
default = simple