Reputation: 371
I have an executable that generates javascript that I'd like to pipe into deno run
, however the run
subcommand only seems to take a script path as an argument, and doesn't support the usual convention of -
to read from stdin.
Workarounds that I'm aware of but not satisfied with:
deno run
deno repl
(this prints a bunch of repl garbage along with the desired script output)deno eval
(my generated javascript is large... feels icky to provide as a command line argument)Upvotes: 3
Views: 685
Reputation: 40414
Now you can use the following syntax:
cat file.js | deno run -
If you need permissions:
cat file.js | deno run --allow-all -
Upvotes: 2