tvl-depot/tools/run
William Carroll 9e0fdd3973 Remove default values for Nix expression parameters
I'm not sure if this commit breaks everything in my monorepo. I think it
will.

Why am I doing this? Perhaps it's a bad idea. I don't fully understand how
readTree works. My ignorance is costing me hours of time spent debugging. In an
effort to better understand readTree, I'm removing the default values for my Nix
expression parameters, which I believe have preventing errors from surfacing.
2020-03-01 22:32:24 +00:00
..
.envrc Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
default.nix Remove default values for Nix expression parameters 2020-03-01 22:32:24 +00:00
main.go Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
README.md Tidy up structure of briefcase 2020-02-12 16:58:29 +00:00
shell.nix Remove default values for Nix expression parameters 2020-03-01 22:32:24 +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