Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/cliffy/examples/command/action_handler.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
File
#!/usr/bin/env -S deno run
import { Command } from "../../command/mod.ts";
await new Command() .command("rm <dir>", "Remove directory.") .option("-r, --recursive [recursive:boolean]", "Remove recursively") .action(({ recursive }, dir: string) => { console.log("remove " + dir + (recursive ? " recursively" : "")); }) .parse(Deno.args);