HNHacker News
TopNewBestAskShowJobs

soenkehahn

3 karma · joined August 6, 2021

submissionscomments
soenkehahn··on Garn v0.0.16 ships with vitejs and GitHub pages plugins
garn v0.0.16 ships with a new plugin system and two plugins, for bundling vitejs projects and for deploying web apps to github pages
soenkehahn··on Garn, a TypeScript-based Nix front end
One working example is this:

  import * as garn from "https://garn.io/ts/v0.0.14/mod.ts";
  import * as pkgs from "https://garn.io/ts/v0.0.14/nixpkgs.ts";

  export const main: garn.Executable = garn.shell`${pkgs.jq}/bin/jq --version`;
Put that in a 'garn.ts' file and run 'garn run main' and you should see the version of 'jq' that you can get from our 'nixpkgs' module.

But yeah, I completely agree with the sentiment here. This is a rather cumbersome syntax to support a use-case that we don't even have examples for. So clearly the normal usage shouldn't force you to use template strings.

soenkehahn··on Garn, a TypeScript-based Nix front end
lol, no we haven't. That is hilarious though! We might steal that name for some future project.
soenkehahn··on Garn, a TypeScript-based Nix front end
(One of the `garn` developers here.)

Yeah, that's definitely the intention. If you end up trying it out, I'd love to hear how it went!