{"name":"gitinfo","description":"Gets information about a Git repository.","keywords":["github","repository","info"],"version":"2.2.0","main":"./dist/gitinfo.js","author":{"name":"Gajus Kuizinas","email":"gajus@gajus.com","url":"http://gajus.com"},"repository":{"type":"git","url":"git+https://github.com/gajus/gitinfo.git"},"license":"BSD-3-Clause","scripts":{"build":"babel ./src --out-dir ./dist --copy-files","watch":"babel ./src -w --out-dir ./dist --copy-files","test":"NODE_ENV=development mocha --compilers js:babel-register ./tests","documentation":"documentation build ./src --format md --access public --output ./API.md && gitdown ./.README/README.md --output-file ./README.md","lint":"eslint ./src ./tests","precommit":"npm run lint && npm run test","commitmsg":"commitlint -e"},"devDependencies":{"@commitlint/cli":"3.0.3","babel-cli":"^6.11.4","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-istanbul":"^2.0.0","babel-plugin-ramda":"^1.1.5","babel-plugin-syntax-flow":"^6.13.0","babel-plugin-transform-flow-strip-types":"^6.8.0","babel-plugin-transform-object-rest-spread":"^6.8.0","babel-plugin-typecheck":"^3.9.0","babel-preset-es2015-node4":"^2.1.0","babel-register":"^6.11.6","chai":"^3.5.0","conventional-changelog-lint-config-canonical":"^1.0.0","conventional-recommended-bump":"^0.3.0","coveralls":"^2.11.12","documentation":"^4.0.0-beta9","eslint":"^3.3.1","eslint-config-canonical":"^1.7.16","flow-bin":"^0.31.1","gitdown":"^2.4.10","husky":"^0.11.6","mocha":"^3.0.2","nyc":"^8.1.0","standard-version":"^2.4.0","travis-after-all":"^1.4.4"},"dependencies":{"ini":"^1.3.4","ramda":"^0.22.1"},"nyc":{"include":["src/**/*.js"],"reporter":["text-lcov"],"require":["babel-register"],"sourceMap":false,"instrument":false},"gitHead":"24dde226da187a2547a2378f669444f47f99eb78","bugs":{"url":"https://github.com/gajus/gitinfo/issues"},"homepage":"https://github.com/gajus/gitinfo#readme","_id":"gitinfo@2.2.0","_npmVersion":"5.0.3","_nodeVersion":"8.0.0","_npmUser":{"name":"gajus","email":"gajus@gajus.com"},"dist":{"integrity":"sha512-1w0Px1POO1d8NxX+DNkCiXL3JOKZMwtQWUp6vFa/rDdYbtAUH3eXsokT5pGJuIO/9NZXiK9bFBRSO1AlheVw8Q==","shasum":"467679071d87cf3e73e98520cc607dcfb347c29f","tarball":"http://registry-npm.ywwl.com/gitinfo/download/gitinfo-2.2.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE0kGsLUrMpiJgkbQtOok4qvwHd2MHcGlVzbbch1cC1aAiB0ffckcbJzLHn9DkAylDbnroACn2Zj3km257RAa+kNLA=="}],"size":11288,"noattachment":false,"key":"/gitinfo/-/gitinfo-2.2.0.tgz"},"maintainers":[{"email":"gajus@gajus.com","name":"gajus"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gitinfo-2.2.0.tgz_1500572971795_0.5353099312633276"},"directories":{},"readme":"# gitinfo\n\n[![Travis build status](http://img.shields.io/travis/gajus/gitinfo/master.svg?style=flat-square)](https://travis-ci.org/gajus/gitinfo)\n[![NPM version](http://img.shields.io/npm/v/gitinfo.svg?style=flat-square)](https://www.npmjs.org/package/gitinfo)\n[![Canonical Code Style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)\n\nGets information about Git repository.\n\n## Implementation\n\ngitinfo reads the contents of the `./git` directory to extract information.\n\n## API\n\n```js\nimport createGitinfo from 'gitinfo';\n\n/**\n * @typedef Configuration\n * @property {string} [defaultBranchName] Default branch name to fallback to. Default: throws an error if branch cannot be resolved.\n * @property {string} [gitPath] Path used to resolve .git path. Defaults to `__dirname`.\n */\n\n/**\n * @access public\n * @name createGitinfo\n * @param {Configuration} userConfig\n */\nconst gitinfo = createGitinfo();\n\n/**\n * Returns **Any** GitHub repository URL.\n */\ngitinfo.getGithubUrl();\n\n/**\n * Returns **Any** Name of the current branch.\n */\ngitinfo.getBranchName();\n\n/**\n * Returns **Any** Remote URL of the current branch.\n */\ngitinfo.getRemoteUrl();\n\n/**\n * Returns **Any** Absolute path to the .git/ directory.\n */\ngitinfo.getGitPath();\n\n/**\n * Returns **Any** Username of the repository author.\n */\ngitinfo.getUsername();\n\n/**\n * Returns **Any** Repository name.\n */\ngitinfo.getName();\n\n/**\n * Returns **Any** Commit SHA of the current branch.\n */\ngitinfo.getHeadSha();\n\n/**\n * Returns **Any** Representation of the .git/config file.\n */\ngitinfo.getConfig();\n\n```\n\n## Download\n\nDownload using NPM:\n\n```sh\nnpm install gitinfo\n\n```\n","publish_time":1500572972674,"_cnpm_publish_time":1500572972674,"dist-tags":{"latest":"2.4.0"}}