What is settings.js flowFilePretty supposed to do?

My flows_hostname.json file is just one very long line.

In settings.js it says:

// To enabled pretty-printing of the flow within the flow file, set the following
//  property to true:
// flowFilePretty: true,

But if I uncomment the property and restart Node-red, nothing changes.

So what/how is it supposed to achieve?

I believe you will need to change something & deploy.

Oh! that was a surprise. Thanks.

pi@GlassPi:~/.node-red $ wc flows_GlassPi.json
     1   4240 168577 flows_GlassPi.json

I moved a node by one grid square and redeployed just that changed node.

pi@GlassPi:~/.node-red $ wc flows_GlassPi.json
 11328  23355 288580 flows_GlassPi.json

I'm curious what my flows will look like after employing this option and I'd like to try it. I suppose I can try it right after saving the current layout to version control and restore it if I don't like the change but is there screenshots somewhere of the before and after?

I don't know if commenting the option out will change things back, not tried that.

The difference is the same as when you export a flow JSON and select "compact" vs "formatted".

The documentation says the option "makes your flow file easier to read" but 11000+ lines is about as easy to read as War & Peace :grinning:

1 Like

Oh! So it doesn't rearrange nodes on a worksheet? I thought that was it's purpose. I guess I didn't read carefully enough or not the right info.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.