Commit 88d2eacf authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

save two files for machine config

parent 2c19b398
......@@ -9,12 +9,15 @@ define(['underscore', 'fileSaverLib', 'lattice', 'materials', 'ribbon', 'menuWra
// require(['jsonFn'], function(JSONfn){
// console.log(data.toString());
var jsonString = JSON.stringify(data, null, '\t');
if (data.assembler){
// jsonString.replace(/\\"/g,"\uFFFF"); //U+ FFFF
// jsonString = jsonString.replace(/\"([^"]+)\":/g,"$1:").replace(/\uFFFF/g,"\\\"");
}
var blob = new Blob([jsonString], {type: "text/plain;charset=utf-8"});
saveAs(blob, name + extension);
if (data.assembler){
jsonString.replace(/\\"/g,"\uFFFF"); //U+ FFFF
jsonString = jsonString.replace(/\"([^"]+)\":/g,"$1:").replace(/\uFFFF/g,"\\\"");
var blob = new Blob([jsonString], {type: "text/plain;charset=utf-8"});
saveAs(blob, name + "-forAmanda" + extension);
}
// });
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment