Skip to content

Instantly share code, notes, and snippets.

@kkm
Created December 11, 2016 06:18
Show Gist options
  • Save kkm/92756db229f4a00e08f5f7e623f38cb6 to your computer and use it in GitHub Desktop.
Save kkm/92756db229f4a00e08f5f7e623f38cb6 to your computer and use it in GitHub Desktop.
var glob = require("d:/kkm/Desktop/node_modules/glob")
const exec = require('child_process').exec;
// options is optional
var nwjc = "nwjc";
glob("**/*.js", null, function(er, files) {
for (var i in files) {
var file = files[i];
var cmd = nwjc + " " + file + " " + file.substr(0, file.length - 3) + ".bin";
console.log(cmd);
exec(cmd, function(err, stdout) {
console.log(stdout);
});
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment