tvl-depot/users/wpcarro/tools/run
William Carroll b6d143e5d2 fix(wpcarro/nix): Remove <briefcase> references
Angle-bracketed references are a Nix anti-pattern, and thankfully this
repository enforces this as a standard.

TL;DR:
- Drop angle-bracketed references
- Change `briefcase` -> `users.wpcarro`
- Fix any resulting regressions
- Fix //users/wpcarro/tools/simple_vim
- Mark //users/wpcarro/boilerplate/typescript and related projects
  as broken
- drop .skip-subtree file, enabling depot CI

Change-Id: I7153cbabafa617bfd6b199370cbec65cb75441f6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/4325
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: wpcarro <wpcarro@gmail.com>
2021-12-15 15:49:40 +00:00
..
.envrc subtree(users/wpcarro): docking briefcase at '24f5a642' 2021-12-14 02:15:47 +03:00
default.nix fix(wpcarro/nix): Remove <briefcase> references 2021-12-15 15:49:40 +00:00
main.go subtree(users/wpcarro): docking briefcase at '24f5a642' 2021-12-14 02:15:47 +03:00
README.md subtree(users/wpcarro): docking briefcase at '24f5a642' 2021-12-14 02:15:47 +03:00
shell.nix fix(wpcarro/nix): Remove <briefcase> references 2021-12-15 15:49:40 +00:00

run

Simplify the commands you call to run scripts on the command line.

> run path/to/file.py
> run path/to/file.ts

How?

Define a run.json configuration mapping commands to filename extensions like so:

{
  ".ts": "npx ts-node $file",
  ".py": "python3 $file"
}

Then call run path/to/some/file.ts on the command line, and npx ts-node file.ts will run.

Installation

Install run using Nix.

> nix-env -iA briefcase.run