| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,13 +4,16 @@ const ejs = require("ejs"); | |||
| 4 | 4 | const path = require("path"); | |
| 5 | 5 | const idefs = require("./idefs"); | |
| 6 | 6 | ||
| 7 | + | ||
| 8 | + var local = path.join.bind(null, __dirname); | ||
| 9 | + | ||
| 7 | 10 | var classTemplate = ejs.compile( | |
| 8 | - "" + fs.readFileSync(String(__dirname + "/templates/class.cc.ejs")), { | ||
| 11 | + "" + fs.readFileSync(local("templates/class.cc.ejs")), { | ||
| 9 | 12 | filename: "class.cc" | |
| 10 | 13 | }); | |
| 11 | 14 | ||
| 12 | 15 | var headerTemplate = ejs.compile( | |
| 13 | - "" + fs.readFileSync(String(__dirname + "/templates/header.h.ejs")), { | ||
| 16 | + "" + fs.readFileSync(local("templates/header.h.ejs")), { | ||
| 14 | 17 | filename: "header.h" | |
| 15 | 18 | }); | |
| 16 | 19 | ||
@@ -21,10 +24,9 @@ Object.keys(idefs).forEach(function(keyName) { | |||
| 21 | 24 | return; | |
| 22 | 25 | } | |
| 23 | 26 | ||
| 24 | - fs.writeFileSync( | ||
| 25 | - __dirname + "/../include/" + idef.filename, headerTemplate(idef)); | ||
| 27 | + fs.writeFileSync(local("../include/", idef.filename), headerTemplate(idef)); | ||
| 26 | 28 | ||
| 27 | 29 | fs.writeFileSync( | |
| 28 | - __dirname + "/../src/" + path.basename(idef.filename, ".h") + ".cc", | ||
| 30 | + local("../src/", path.basename(idef.filename, ".h")) + ".cc", | ||
| 29 | 31 | classTemplate(idef)); | |
| 30 | 32 | }); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,8 +66,7 @@ | |||
| 66 | 66 | "lint": "jshint src", | |
| 67 | 67 | "test": "cd test && nodeunit nodegit.js", | |
| 68 | 68 | "publish": "node-pre-gyp package && node-pre-gyp publish", | |
| 69 | - "codegen": "node build/codegen/t.js ; node build/codegen/generate.js", | ||
| 70 | - "generate": "node generate/setup ; node generate", | ||
| 69 | + "generate": "node generate/setup && node generate", | ||
| 71 | 70 | "install": "npm run generate && node install" | |
| 72 | 71 | } | |
| 73 | 72 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -200,9 +200,6 @@ | |||
| 200 | 200 | "vendor/libgit2/src/transports/smart_pkt.c", | |
| 201 | 201 | "vendor/libgit2/src/transports/smart_protocol.c", | |
| 202 | 202 | "vendor/libgit2/src/transports/ssh.c", | |
| 203 | - "vendor/libgit2/src/unix/map.c", | ||
| 204 | - "vendor/libgit2/src/unix/posix.h", | ||
| 205 | - "vendor/libgit2/src/unix/realpath.c", | ||
| 206 | 203 | "vendor/libgit2/src/xdiff/xdiff.h", | |
| 207 | 204 | "vendor/libgit2/src/xdiff/xdiffi.c", | |
| 208 | 205 | "vendor/libgit2/src/xdiff/xdiffi.h", | |
@@ -220,6 +217,13 @@ | |||
| 220 | 217 | "vendor/libgit2/src/xdiff/xutils.h" | |
| 221 | 218 | ], | |
| 222 | 219 | "conditions": [ | |
| 220 | + ["OS=='win'", {}, { | ||
| 221 | + "sources": [ | ||
| 222 | + "vendor/libgit2/src/unix/map.c", | ||
| 223 | + "vendor/libgit2/src/unix/posix.h", | ||
| 224 | + "vendor/libgit2/src/unix/realpath.c", | ||
| 225 | + ] | ||
| 226 | + }], | ||
| 223 | 227 | ["OS=='linux'", { | |
| 224 | 228 | "cflags": [ | |
| 225 | 229 | "-w", | |
@@ -270,6 +274,7 @@ | |||
| 270 | 274 | "vendor/libgit2/src/win32/findfile.c", | |
| 271 | 275 | "vendor/libgit2/src/win32/findfile.h", | |
| 272 | 276 | "vendor/libgit2/src/win32/git2.rc", | |
| 277 | + "vendor/libgit2/src/win32/map.c", | ||
| 273 | 278 | "vendor/libgit2/src/win32/mingw-compat.h", | |
| 274 | 279 | "vendor/libgit2/src/win32/msvc-compat.h", | |
| 275 | 280 | "vendor/libgit2/src/win32/posix.h", | |
| Back | FazBrowse Home | New Git URL |
0 commit comments