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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions generate/index.js
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));
});
});
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions package.json
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