forked from okunishinishi/node-gitconfig
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Taka Okunishi
committed
May 8, 2016
1 parent
603d176
commit c01d540
Showing
21 changed files
with
333 additions
and
375 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,8 @@ This file is generated by ape-tmpl. Do not update manually. | |
[bd_gemnasium_shield_url]: https://gemnasium.com/okunishinishi/node-gitconfig.svg | ||
[bd_npm_url]: http://www.npmjs.org/package/gitconfig | ||
[bd_npm_shield_url]: http://img.shields.io/npm/v/gitconfig.svg?style=flat | ||
[bd_bower_badge_url]: https://img.shields.io/bower/v/gitconfig.svg?style=flat | ||
[bd_standard_url]: http://standardjs.com/ | ||
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg | ||
|
||
<!-- Badge End --> | ||
|
||
|
@@ -68,32 +69,32 @@ Usage | |
--------- | ||
|
||
```javascript | ||
"use strict"; | ||
'use strict' | ||
|
||
const gitconfig = require('gitconfig'); | ||
const gitconfig = require('gitconfig') | ||
|
||
// Set git config values. | ||
gitconfig.set({ | ||
'user.mail': "[email protected]" | ||
'user.mail': '[email protected]' | ||
}, { | ||
location: 'local' | ||
}, function (err) { | ||
/*...*/ | ||
}); | ||
location: 'local' | ||
}).then(() => { | ||
/* ... */ | ||
}) | ||
|
||
// Unset git config values. | ||
gitconfig.unset(['user.mail'], { | ||
location: 'local' | ||
}, (err) => { | ||
/*...*/ | ||
}); | ||
gitconfig.unset([ 'user.mail' ], { | ||
location: 'local' | ||
}).then(() => { | ||
/* ... */ | ||
}) | ||
|
||
// Git all config values. | ||
gitconfig.get({ | ||
location: 'global' | ||
}, (err, config) => { | ||
/*...*/ | ||
}); | ||
location: 'global' | ||
}).then((config) => { | ||
/* ... */ | ||
}) | ||
``` | ||
|
||
|
||
|
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
"use strict"; | ||
'use strict' | ||
|
||
const gitconfig = require('gitconfig'); | ||
const gitconfig = require('gitconfig') | ||
|
||
// Set git config values. | ||
gitconfig.set({ | ||
'user.mail': "[email protected]" | ||
'user.mail': '[email protected]' | ||
}, { | ||
location: 'local' | ||
}, function (err) { | ||
/*...*/ | ||
}); | ||
location: 'local' | ||
}).then(() => { | ||
/* ... */ | ||
}) | ||
|
||
// Unset git config values. | ||
gitconfig.unset(['user.mail'], { | ||
location: 'local' | ||
}, (err) => { | ||
/*...*/ | ||
}); | ||
gitconfig.unset([ 'user.mail' ], { | ||
location: 'local' | ||
}).then(() => { | ||
/* ... */ | ||
}) | ||
|
||
// Git all config values. | ||
gitconfig.get({ | ||
location: 'global' | ||
}, (err, config) => { | ||
/*...*/ | ||
}); | ||
location: 'global' | ||
}).then((config) => { | ||
/* ... */ | ||
}) |
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
Oops, something went wrong.