mercredi 1 avril 2015

node-webkit v8 snapshot external module

Im currently trying to pack my nw project into a .bin file, when I execute the nwjc command and try to run my app.bin file on nw.exe I wont get any error.


My app.js requires a js module I wrote in the same directory



var mule = require("./mule"),
fs = require("fs");


And on mule.js



var request = require("request");
var MuleMaker;
(function (MuleMaker) {
var Mule = (function () {
function Mule(inbox) {
this.inbox = inbox;
}

return Mule;
})();
MuleMaker.Mule = Mule;
})(MuleMaker = exports.MuleMaker || (exports.MuleMaker = {}));


So if I pack app.bin on a .nw zip file without adding mule.js my app wont find the module mule.


I need to make it so app.bin will also contain mule.js and not just app.js. should I also convert mule.js into mule.bin and then add it into my index.html file or does nwjc do that by default and my code is wrong?


I want to proctect app.js and mule.js code.


Aucun commentaire:

Enregistrer un commentaire