1
0
Fork 0
master
Gordon Williams 2019-11-04 15:03:50 +00:00
parent 9d109374e9
commit 0b7d30908a
2 changed files with 3 additions and 3 deletions

View File

@ -19,9 +19,9 @@ uploadApp : app => {
// Load all files
Promise.all(app.storage.map(storageFile => httpGet("apps/"+storageFile.file)
// map each file to a command to load into storage
.then(contents=>`\x10require('Storage').write(${toJS(storageFile.name)},${storageFile.evaluate ? contents : toJS(contents)});`)))
.then(contents=>`\x10require('Storage').write(${toJS(storageFile.name)},${storageFile.evaluate ? contents.trim() : toJS(contents)});`)))
.then(function(fileContents) {
fileContents = fileContents.join("\n");
fileContents = fileContents.join("\n")+"\n";
console.log("uploadApp",fileContents);
// reset to ensure we have enough memory to upload what we need to
Puck.write("\x03reset();\n", function() {

View File

@ -88,7 +88,7 @@
<script src="http://www.puck-js.com/puck.js"></script>
<script src="https://www.puck-js.com/puck.js"></script>
<script src="utils.js"></script>
<script src="comms.js"></script>
<script src="index.js"></script>