diff --git a/.gitignore b/.gitignore index 720f634..cbc7adf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ result # soonix /test.yaml +/test.json # end soonix diff --git a/lib/lib.nix b/lib/lib.nix index a1abbff..cf82725 100644 --- a/lib/lib.nix +++ b/lib/lib.nix @@ -17,10 +17,10 @@ autogeneratedMessage = { - yaml = "# Generated by soonix, DO NOT EDIT"; - toml = "# Generated by soonix, DO NOT EDIT"; - lua = "--- Generated by soonix, DO NOT EDIT"; - xml = ""; + yaml = "# Generated by soonix, DO NOT EDIT\n"; + toml = "# Generated by soonix, DO NOT EDIT\n"; + lua = "--- Generated by soonix, DO NOT EDIT\n"; + xml = "\n"; }.${ format } or ""; @@ -31,7 +31,7 @@ '' ${pre.buildCommand} cp $out tmp - cat <(echo "${autogeneratedMessage}") tmp > $out + cat <(echo -n "${autogeneratedMessage}") tmp > $out ''; }); diff --git a/nix/repo/soonix.nix b/nix/repo/soonix.nix index 7983897..83882a7 100644 --- a/nix/repo/soonix.nix +++ b/nix/repo/soonix.nix @@ -22,5 +22,14 @@ in gitignore = true; }; }; + testJson = { + output = "test.json"; + data.hello = "world"; + opts.format = "json"; + hook = { + mode = "copy"; + gitignore = true; + }; + }; }; }).config