FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Moved wrapper/copy out of include/src by johnhaley81 · Pull Request #233 · nodegit/nodegit · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cc  (2) .h  (2) .js  (1) .json  (1) All 4 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
24 changes: 15 additions & 9 deletions generate/index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ const path = require("path");
const combyne = require("combyne");
const file = require("./util/file");
const idefs = require("./idefs");
const promisify = require("promisify-node");
const fse = promisify(require("fs-extra"));

// Customize the delimiters so as to not process `{{{` or `}}}`.
combyne.settings.delimiters = {
Expand Down Expand Up @@ -75,14 +77,18 @@ var enabled = idefs.filter(function(idef) {
return !idef.ignore;
});

// TODO Wipe out all existing source files.
fse.remove(path.resolve(__dirname, "../src")).then(function() {
return fse.remove(path.resolve(__dirname, "../include"));
}).then(function() {
return fse.copy(path.resolve(__dirname, "./manual/"), path.resolve(__dirname, "../"));
}).then(function() {
// Write out single purpose templates.
file.write("../binding.gyp", templates.binding.render(enabled));
file.write("../src/nodegit.cc", templates.nodegit.render(enabled));

// Write out single purpose templates.
file.write("../binding.gyp", templates.binding.render(enabled));
file.write("../src/nodegit.cc", templates.nodegit.render(enabled));

// Write out all the classes.
enabled.forEach(function(idef) {
file.write("../src/" + idef.name + ".cc", templates.class.render(idef));
file.write("../include/" + idef.name + ".h", templates.header.render(idef));
// Write out all the classes.
enabled.forEach(function(idef) {
file.write("../src/" + idef.name + ".cc", templates.class.render(idef));
file.write("../include/" + idef.name + ".h", templates.header.render(idef));
});
});
10 changes: 5 additions & 5 deletions package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@
"node-pre-gyp"
],
"dependencies": {
"fs-extra": "~0.12.0",
"combyne": "~0.6.0",
"fs-extra": "^0.12.0",
"nan": "~1.3.0",
"node-gyp": "~1.0.2",
"node-pre-gyp": "~0.5.27",
"promise": "~6.0.0",
"promisify-node": "~0.1.2",
"q": "~1.0.1",
"combyne": "~0.6.0",
"request": "~2.45.0",
"rimraf": "~2.2.8",
"tar": "~1.0.1",
"which": "~1.0.5",
"promise": "~6.0.0",
"promisify-node": "~0.1.2"
"which": "~1.0.5"
},
"devDependencies": {
"async": "~0.9.0",
Expand Down

Back | FazBrowse Home | New Git URL