forked from nodegit/nodegit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
executable file
·44 lines (37 loc) · 1.04 KB
/
index.js
File metadata and controls
executable file
·44 lines (37 loc) · 1.04 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
// Used to detect for Cygwin
var os = require('os');
// Required for Windows/Cygwin support
var root = [__dirname, '/vendor/libgit2/build/shared'].join(''),
path = process.env.PATH;
if (~os.type().indexOf('CYGWIN') && !~path.indexOf(root)) {
process.env.PATH = root + ':' + path;
}
// Assign raw api to module
var rawApi;
try {
rawApi = require('./build/Release/nodegit');
} catch (e) {
try {
rawApi = require('./build/Debug/nodegit');
} catch(e) {
rawApi = require('./build/emscripten/nodegit');
}
}
// Set the exports prototype to the raw API.
exports.__proto__ = rawApi;
// Import extensions
//require('./lib/commit.js');
//require('./lib/blob.js');
//require('./lib/object.js');
//require('./lib/signature.js');
//require('./lib/odb.js');
//require('./lib/oid.js');
//require('./lib/index.js');
//require('./lib/repository.js');
//require('./lib/reference.js');
//require('./lib/revwalk.js');
//require('./lib/tree.js');
// Set version
exports.version = require('./package').version;
// Initialize threads
//exports.Threads.init();