Skip to content
This repository
Browse code

updated nodegit version, cleaned up index file, and updated makefile

  • Loading branch information...
commit f64c878b243b692b0c7cb47cbb215426ea3ffd29 1 parent 753b37c
Tim Branyen authored September 05, 2011

Showing 2 changed files with 26 additions and 35 deletions. Show diff stats Hide diff stats

  1. 2  Makefile
  2. 59  lib/index.js
2  Makefile
@@ -24,9 +24,11 @@ install:
24 24
 	@@mkdir -p $(INSTALL_PATH)
25 25
 	@@mkdir -p $(INSTALL_PATH)/build/default
26 26
 	@@mkdir -p $(INSTALL_PATH)/lib
  27
+	@@mkdir -p $(INSTALL_PATH)/vendor
27 28
 
28 29
 	@@cp -f $(BASE)/build/default/nodegit.node $(INSTALL_PATH)/build/default/nodegit.node
29 30
 	@@cp -f $(BASE)/lib/* $(INSTALL_PATH)/lib/
  31
+	@@cp -rf $(BASE)/vendor/* $(INSTALL_PATH)/vendor/
30 32
 	@@cp -f $(BASE)/package.json $(INSTALL_PATH)/
31 33
 
32 34
 	@@echo "Installed to $(INSTALL_PATH)"
59  lib/index.js
... ...
@@ -1,40 +1,29 @@
1  
-// System
2  
-var os = require( 'os' );
3  
-
4  
-// Library
5  
-var util = require( './util.js' ).util,
6  
-    blob = require( './blob.js' ).blob,
7  
-    repo = require( './repo.js' ).repo,
8  
-    error = require( './error.js' ).error,
9  
-    sig = require( './sig.js' ).sig,
10  
-    oid = require( './oid.js' ).oid,
11  
-    object = require( './object.js' ).object,
12  
-    ref = require( './ref.js' ).ref,
13  
-    revwalk = require( './revwalk.js' ).revwalk,
14  
-    commit = require( './commit.js' ).commit,
15  
-    tree = require( './tree.js' ).tree,
16  
-    entry = require( './tree_entry.js' ).entry;
  1
+// Used to detect for Cygwin
  2
+var os = require("os");
17 3
 
18 4
 // Required for Windows/Cygwin support
19  
-var root = [ __dirname, '/../vendor/libgit2/build/shared' ].join( '' ), path = process.env.PATH;
20  
-if( ~os.type().indexOf( 'CYGWIN' ) && !~path.indexOf( root ) ) {
21  
-  process.env.PATH = root + ':' + path;
  5
+var root = [ __dirname, "/../vendor/libgit2/build/shared" ].join(""),
  6
+  path = process.env.PATH;
  7
+
  8
+if (~os.type().indexOf("CYGWIN") && !~path.indexOf(root)) {
  9
+  process.env.PATH = root + ":" + path;
22 10
 }
23 11
 
24  
-// Assign raw api to module
25  
-exports.raw = require( '../build/default/nodegit' );
  12
+// Import libraries
  13
+exports.util = require("./util.js").util;
  14
+exports.blob = require("./blob.js").blob;
  15
+exports.repo = require("./repo.js").repo;
  16
+exports.error = require("./error.js").error;
  17
+exports.sig = require("./sig.js").sig;
  18
+exports.oid = require("./oid.js").oid;
  19
+exports.object = require("./object.js").object;
  20
+exports.ref = require("./ref.js").ref;
  21
+exports.revwalk = require("./revwalk.js").revwalk;
  22
+exports.commit = require("./commit.js").commit;
  23
+exports.tree = require("./tree.js").tree;
  24
+exports.entry = require("./tree_entry.js").entry;
26 25
 
27  
-// Assign to module
28  
-exports.blob = blob;
29  
-exports.util = util;
30  
-exports.repo = repo;
31  
-exports.ref = ref;
32  
-exports.oid = oid;
33  
-exports.object = object;
34  
-exports.sig = sig;
35  
-exports.error = error;
36  
-exports.revwalk = revwalk;
37  
-exports.commit = commit;
38  
-exports.tree = tree;
39  
-exports.entry = entry;
40  
-exports.version = '0.0.5';
  26
+// Assign raw api to module
  27
+exports.raw = require("../build/default/nodegit");
  28
+// Set version
  29
+exports.version = "0.0.6";

0 notes on commit f64c878

Please sign in to comment.
Something went wrong with that request. Please try again.