diff --git a/README.md b/README.md index 731999d..0745b71 100644 --- a/README.md +++ b/README.md @@ -256,6 +256,8 @@ functions. * [dos2unix](programs/dos2unix.nix) * [dprint](programs/dprint.nix) * [dscanner](programs/dscanner.nix) +* [dyff-json](programs/dyff-json.nix) +* [dyff-yaml](programs/dyff-yaml.nix) * [efmt](programs/efmt.nix) * [elm-format](programs/elm-format.nix) * [erlfmt](programs/erlfmt.nix) diff --git a/examples/formatter-dyff-json.toml b/examples/formatter-dyff-json.toml new file mode 100644 index 0000000..3c03b4f --- /dev/null +++ b/examples/formatter-dyff-json.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.dyff-json] +command = "dyff" +excludes = [] +includes = ["*.json"] +options = ["json", "--restructure", "--in-place"] diff --git a/examples/formatter-dyff-yaml.toml b/examples/formatter-dyff-yaml.toml new file mode 100644 index 0000000..dc1242b --- /dev/null +++ b/examples/formatter-dyff-yaml.toml @@ -0,0 +1,6 @@ +# Example generated by ../examples.sh +[formatter.dyff-yaml] +command = "dyff" +excludes = [] +includes = ["*.yaml", "*.yml"] +options = ["yaml", "--restructure", "--in-place"] diff --git a/programs/dyff-json.nix b/programs/dyff-json.nix new file mode 100644 index 0000000..e72a1a0 --- /dev/null +++ b/programs/dyff-json.nix @@ -0,0 +1,17 @@ +{ mkFormatterModule, ... }: +{ + meta.maintainers = [ ]; + + imports = [ + (mkFormatterModule { + name = "dyff-json"; + package = "dyff"; + args = [ + "json" + "--restructure" + "--in-place" + ]; + includes = [ "*.json" ]; + }) + ]; +} diff --git a/programs/dyff-yaml.nix b/programs/dyff-yaml.nix new file mode 100644 index 0000000..664fc99 --- /dev/null +++ b/programs/dyff-yaml.nix @@ -0,0 +1,20 @@ +{ mkFormatterModule, ... }: +{ + meta.maintainers = [ ]; + + imports = [ + (mkFormatterModule { + name = "dyff-yaml"; + package = "dyff"; + args = [ + "yaml" + "--restructure" + "--in-place" + ]; + includes = [ + "*.yaml" + "*.yml" + ]; + }) + ]; +}