-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { ArgParsingOptions, Args, parseFlags as _parseFlags } from "../deps.ts"; | ||
|
||
export function parseFlags( | ||
args: Array<string>, | ||
options?: ArgParsingOptions, | ||
): Args { | ||
if ($.verbose) { | ||
console.log($.brightMagenta(">_ %s"), args.join(" ")); | ||
} | ||
return _parseFlags(args, options); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
import type { $, cd as _cd, quote as _quote } from "./mod.ts"; | ||
import type { | ||
$, | ||
cd as _cd, | ||
parseFlags as _parseFlags, | ||
quote as _quote, | ||
} from "./mod.ts"; | ||
import type { | ||
ArgParsingOptions as _ArgParsingOptions, | ||
Args as _Args, | ||
} from "./deps.ts"; | ||
|
||
declare global { | ||
const $: $; | ||
const cd: typeof _cd; | ||
const quote: typeof _quote; | ||
const parseFlags: typeof _parseFlags; | ||
|
||
type ArgParsingOptions = _ArgParsingOptions; | ||
type Args = _Args; | ||
|
||
interface Window { | ||
$: $; | ||
cd: typeof _cd; | ||
quote: typeof _quote; | ||
parseFlags: typeof _parseFlags; | ||
} | ||
} |