|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8"> |
| 5 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 6 | + |
| 7 | + <title>tbranyen/nodegit @ GitHub</title> |
| 8 | + |
| 9 | + <link rel="stylesheet" href="css/common.css"> |
| 10 | + <link rel="stylesheet" href="css/ir_black.css"> |
| 11 | + </head> |
| 12 | + |
| 13 | + <body> |
| 14 | + <!-- Fork Me --> |
| 15 | + <a href="http://github.com/tbranyen/nodegit"> |
| 16 | + <img class="forkme" src="http://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"> |
| 17 | + </a> |
| 18 | + |
| 19 | + <div id="container"> |
| 20 | + |
| 21 | + <!-- Download helpers --> |
| 22 | + <section class="download"> |
| 23 | + <a href="http://github.com/tbranyen/nodegit/zipball/master"> |
| 24 | + <img src="http://github.com/images/modules/download/zip.png"></a> |
| 25 | + <a href="http://github.com/tbranyen/nodegit/tarball/master"> |
| 26 | + <img src="http://github.com/images/modules/download/tar.png"></a> |
| 27 | + </section> |
| 28 | + |
| 29 | + <!-- Branding --> |
| 30 | + <section class="branding"> |
| 31 | + <a href="http://github.com/tbranyen/nodegit">nodegit</a> |
| 32 | + <span class="small">by <a href="http://github.com/tbranyen">tbranyen</a></span> |
| 33 | + </section> |
| 34 | + |
| 35 | + <div class="description"> |
| 36 | + <span class="version">Version 0.0.1</span> Node.js libgit2 asynchronous native bindings |
| 37 | + </div> |
| 38 | + |
| 39 | + <p>A collection of non-blocking Node.js libgit2 bindings, raw api, convenience api, unit tests, documentation and accomodations to make contributing easier.</p> |
| 40 | + |
| 41 | + <h2>dependencies</h2> |
| 42 | + <p> |
| 43 | + <ul> |
| 44 | + <li><a href="http://nodejs.org/" target="_blank">Node.js 0.4.2 or latest</a></li> |
| 45 | + <li><a href="http://git-scm.com/" target="_blank">Git</a> <em>( if you want to unit test )</em></li> |
| 46 | + </ul> |
| 47 | + </p> |
| 48 | + |
| 49 | + <h2>install</h2> |
| 50 | + <p> |
| 51 | + <pre class="command">sudo npm install nodegit</pre> |
| 52 | + </p> |
| 53 | + |
| 54 | + <h2>use</h2> |
| 55 | + <p> |
| 56 | + <em>emulate `git log`</em> |
| 57 | + <pre><code> |
| 58 | + // Load in the module |
| 59 | + var git = require( 'nodegit' ); |
| 60 | + // Open a repository for reading |
| 61 | + git.repo( '.git', function( err, repo ) { |
| 62 | + // Success is always 0, failure is always an error string |
| 63 | + if( err ) { throw err; } |
| 64 | + // Use the master branch |
| 65 | + repo.branch( 'master', function( err, branch ) { |
| 66 | + if( err ) { throw err; } |
| 67 | + // Iterate over the revision history |
| 68 | + branch.history.each( function( i, commit ) { |
| 69 | + // Print out `git log` emulation |
| 70 | + console.log( 'commit ' + commit.sha ); |
| 71 | + console.log( commit.author.name + '<' + commit.author.email + '>' ); |
| 72 | + console.log( commit.time ); |
| 73 | + console.log( '\n' ); |
| 74 | + console.log( commit.message ); |
| 75 | + console.log( '\n' ); |
| 76 | + }); |
| 77 | + }); |
| 78 | + }); |
| 79 | + </code> |
| 80 | + </pre> |
| 81 | + </p> |
| 82 | + |
| 83 | + |
| 84 | + <h2>download</h2> |
| 85 | + <p> |
| 86 | + You can download this project in either |
| 87 | + <a href="http://github.com/tbranyen/nodegit/zipball/master">zip</a> or |
| 88 | + <a href="http://github.com/tbranyen/nodegit/tarball/master">tar</a> formats. |
| 89 | + </p> |
| 90 | + |
| 91 | + <p> |
| 92 | + You can also clone and build the project with <a href="http://git-scm.com">Git</a> by running: |
| 93 | + <pre class="command">$ git clone git://github.com/tbranyen/nodegit |
| 94 | + |
| 95 | +$ cd nodegit |
| 96 | + |
| 97 | +$ ./configure |
| 98 | +$ make |
| 99 | +$ make install |
| 100 | + |
| 101 | +update with |
| 102 | + |
| 103 | +$ make update |
| 104 | + </pre> |
| 105 | + </p> |
| 106 | + |
| 107 | + </div> |
| 108 | + |
| 109 | + <script src="js/highlight.pack.js"></script> |
| 110 | + <script> |
| 111 | + hljs.tabReplace = ' '; |
| 112 | + hljs.initHighlightingOnLoad(); |
| 113 | + </script> |
| 114 | + </body> |
| 115 | +</html> |
| 116 | + |
| 117 | +<!-- |
| 118 | + ____ ____ ____ ____ ____ ____ ____ |
| 119 | + ||N |||O |||D |||E |||. |||J |||S || |
| 120 | + ||__|||__|||__|||__|||__|||__|||__|| |
| 121 | + |/__\|/__\|/__\|/__\|/__\|/__\|/__\| |
| 122 | +
|
| 123 | + ____ |
| 124 | + ||+ || |
| 125 | + ||__|| |
| 126 | + |/__\| |
| 127 | +
|
| 128 | + ____ ____ ____ ____ ____ ____ ____ |
| 129 | + ||L |||I |||B |||G |||I |||T |||2 || |
| 130 | + ||__|||__|||__|||__|||__|||__|||__|| |
| 131 | + |/__\|/__\|/__\|/__\|/__\|/__\|/__\| |
| 132 | +
|
| 133 | + ____ |
| 134 | + ||= || |
| 135 | + ||__|| |
| 136 | + |/__\| |
| 137 | +
|
| 138 | + ____ ____ ____ ____ ____ ____ ____ |
| 139 | + ||O |||W |||N |||Z |||O |||N |||E || |
| 140 | + ||__|||__|||__|||__|||__|||__|||__|| |
| 141 | + |/__\|/__\|/__\|/__\|/__\|/__\|/__\| |
| 142 | +
|
| 143 | +--> |
0 commit comments