mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Flows lib honours flowFilePretty setting (#837)
* Flow lib now adheres to pretty flow file, ui also adheres to this as well * added settings mock object in flows_spec get api test * reverted api changes, fixed parse of flow only * try spell flows correctly
This commit is contained in:
@@ -390,6 +390,9 @@ var localfilesystem = {
|
||||
headers += "// "+i+": "+meta[i]+"\n";
|
||||
}
|
||||
}
|
||||
if (type === "flows" && settings.flowFilePretty) {
|
||||
body = JSON.stringify(JSON.parse(body),null,4);
|
||||
}
|
||||
return promiseDir(fspath.dirname(fn)).then(function () {
|
||||
writeFile(fn,headers+body);
|
||||
});
|
||||
|
Reference in New Issue
Block a user