How to pass command line arguments to Deno?
问题 I have a Deno app, that I wish to pass some command line args to. I searched the manual, but found nothing. I tried to use the same commands used in Node.js, assuming they might be sharing some for the std libraries, but it didn't work as well. var args = process.argv.slice(2); // Uncaught ReferenceError: process is not defined Any suggestions? 回答1: You can use Deno.args to access the command line arguments in Deno. To try it create a file test.ts : console.log(Deno.args); And run it with