SiloCityLabs / Cuttlephone

Phone case generator - Joycon and Junglecat rails for 3D printing
https://silocitylabs.github.io/Cuttlephone/
Creative Commons Attribution Share Alike 4.0 International
5 stars 2 forks source link

OpenSCAD mangles JSON git history #1

Open maave0 opened 4 years ago

maave0 commented 4 years ago

Editing phone case configs in OpenSCAD sometimes re-arranges the JSON. This shows up in the git history and makes it harder to track real changes. Can this be fixed while still using the customizer? I didn't want to manage the JSON by hand.

image

ldrrp commented 4 years ago

we could just run it through some kind of json pretty / alphebatizer site evry time we make edits idk

maave0 commented 3 years ago

I added a pre-commit sort script with commit 858222a. You have to copy it into .git/hooks/ yourself. Or run sh pre-commit. It requires having the "jq" utility installed

I'm going to leave this issue open until it's fixed in OpenSCAD or I move off OpenSCAD. Should be easy to sort in any language, just need to talk to devs and submit a PR.

maave0 commented 1 year ago

I suggested the change: https://github.com/openscad/openscad/issues/4447