forked from zhoutony/html5
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
46 lines (46 loc) · 3.63 KB
/
package.json
File metadata and controls
46 lines (46 loc) · 3.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"name": "git-rev",
"version": "0.2.1",
"description": "get the current git commit hash, tag or branch in node",
"main": "index.js",
"bin": {},
"directories": {
"example": "example"
},
"dependencies": {},
"devDependencies": {},
"scripts": {},
"repository": {
"type": "git",
"url": "git://github.com/tblobaum/git-rev.git"
},
"homepage": "https://github.com/tblobaum/git-rev",
"keywords": [],
"author": {
"name": "Thomas Blobaum",
"email": "tblobaum@gmail.com",
"url": "https://github.com/tblobaum/"
},
"license": "MIT",
"readme": "# git-rev\n\naccess git revision state in node\n\n# Example\n\n``` js\nvar git = require('git-rev')\n\ngit.short(function (str) {\n console.log('short', str)\n // => aefdd94\n})\n\ngit.long(function (str) {\n console.log('long', str)\n // => aefdd946ea65c88f8aa003e46474d57ed5b291d1\n})\n\ngit.branch(function (str) {\n console.log('branch', str)\n // => master\n})\n\ngit.tag(function (str) {\n console.log('tag', str)\n // => 0.1.0\n})\n\n```\n\n# Methods\n\n``` js \nvar git = require('git-rev')\n```\n\n## .log(function (array) { ... })\nreturn the git log of `process.cwd()` as an array\n\n``` js\ngit.log(function (array) {\n console.log('log', array)\n // [ [ 'aefdd946ea65c88f8aa003e46474d57ed5b291d1',\n // 'add description',\n // '7 hours ago',\n // 'Thomas Blobaum' ],\n // [ '1eb9a6c8633a5a47a47487f17b17ae545d0e26a8',\n // 'first',\n // '7 hours ago',\n // 'Thomas Blobaum' ],\n // [ '7f85b750b908d28bfeb13ad6dba47d9d604508f9',\n // 'first commit',\n // '2 days ago',\n // 'Thomas Blobaum' ] ]\n})\n```\n\n## .short(function (commit) { ... })\nreturn the result of `git rev-parse --short HEAD`\n\n## .long(function (commit) { ... })\nreturn the result of `git rev-parse HEAD`\n\n## .tag(function (tag) { ... })\nreturn the current tag\n\n## .branch(function (branch) { ... })\nreturn the current branch\n\n# Install\n\n`npm install git-rev`\n\n# License\n\n(The MIT License)\n\nCopyright (c) 2012 Thomas Blobaum <tblobaum@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
"readmeFilename": "README.md",
"_id": "git-rev@0.2.1",
"dist": {
"shasum": "8ccbd2092b345bc2c9149548396df549646ca63f",
"tarball": "http://registry.npmjs.org/git-rev/-/git-rev-0.2.1.tgz"
},
"_npmVersion": "1.1.69",
"_npmUser": {
"name": "tblobaum",
"email": "tblobaum@gmail.com"
},
"maintainers": [
{
"name": "tblobaum",
"email": "tblobaum@gmail.com"
}
],
"_shasum": "8ccbd2092b345bc2c9149548396df549646ca63f",
"_resolved": "https://registry.npmjs.org/git-rev/-/git-rev-0.2.1.tgz",
"_from": "git-rev@>=0.2.1 <0.3.0"
}