Author SHA1 Message Date
didier amyot 79a1201e02 added insecured code to example 2023-03-02 11:40:40 -08:00
didier amyot de31c45cf5 Create the most basic cli possible. 2023-03-02 11:04:16 -08:00
+14
View File
@@ -0,0 +1,14 @@
import { Command } from "https://deno.land/x/cliffy@v0.25.7/command/mod.ts";
async function helloWorld(options, ...args) {
await Deno.writeTextFile("/dev/null", "hello world.", {append: true});
console.log('"hello world" has been written into /dev/null');
}
await new Command()
.name("deno-cli-example")
.version("0.1.0")
.description("Example of a deno CLI.")
.action(helloWorld)
.parse(Deno.args);