You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
jonschlinkert 7d50ed7e48
build readme
10 years ago
.editorconfig first commit 10 years ago
.gitattributes first commit 10 years ago
.gitignore first commit 10 years ago
.jshintrc first commit 10 years ago
.travis.yml adds travis 10 years ago
.verb.md travis badge 10 years ago
LICENSE first commit 10 years ago
README.md build readme 10 years ago
index.js return `null` when .git/config doesn't exist 10 years ago
package.json clean up 10 years ago
test.js return `null` when .git/config doesn't exist 10 years ago

README.md

parse-git-config NPM version Build Status

Parse .git/config into a JavaScript object. sync or async.

Install with npm

npm i parse-git-config --save

Usage

var git = require('parse-git-config');

// sync
var config = git.sync();

// or async
git(function (err, config) {
  // do stuff with err/config
});

Config object will be something like:

{ core:
   { repositoryformatversion: '0',
     filemode: true,
     bare: false,
     logallrefupdates: true,
     ignorecase: true,
     precomposeunicode: true },
  'remote "origin"':
   { url: 'https://github.com/jonschlinkert/parse-git-config.git',
     fetch: '+refs/heads/*:refs/remotes/origin/*' },
  'branch "master"': { remote: 'origin', merge: 'refs/heads/master', ... } }

Run tests

Install dev dependencies:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb-cli on February 27, 2015.