Files
deno-cli-example/mod.ts
T

15 lines
417 B
TypeScript

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);