Skip to content

Commit

Permalink
fix for running under CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 28, 2024
1 parent 97ba433 commit cbf53ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/apploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function fileGetter(url) {
var f = url.slice(0,-5);
console.log("MINIFYING JSON "+f);
var j = eval("("+require("fs").readFileSync(url).toString("binary")+")");
data = JSON.stringify(j);
data = JSON.stringify(j); // FIXME we can do better for Espruino
} else {
var blob = require("fs").readFileSync(url);
if (url.endsWith(".js") || url.endsWith(".json"))
Expand All @@ -117,7 +117,8 @@ exports.getAppFiles = function(app) {
app.files = app.files.split(",").concat(app.provides_modules).join(",");
}
return AppInfo.getFiles(app, getFileOptions).then(files => { allFiles = allFiles.concat(files); return app; });
}
},
showQuery : () => Promise.resolve()
};
return AppInfo.checkDependencies(app, device, uploadOptions).
then(() => AppInfo.getFiles(app, getFileOptions)).
Expand Down

0 comments on commit cbf53ec

Please sign in to comment.