How can I sort YAML files?

前端 未结 9 957
灰色年华
灰色年华 2021-02-02 12:55

I\'ve been trying to sort an i18n translations YAML file with Ruby so I can manage new translations in a better and organized way, but I\'ve been wondering if there is something

相关标签:
9条回答
  • 2021-02-02 13:13

    There is also an atom package that will do this as well https://github.com/akfernun/yaml-sortkeys

    0 讨论(0)
  • 2021-02-02 13:15

    This may be another appealing option: https://github.com/redealumni/i18n_yaml_sorter

    0 讨论(0)
  • 2021-02-02 13:20

    Actually this is a nice question. You want to deep sort hashes. So I don't like to re-invent the wheel and then I searched for a good implementation and I found one I like. Take a look at it https://gist.github.com/1083930. It works fine.

    0 讨论(0)
提交回复
热议问题