mirror of
https://github.com/muerwre/vk-tg-bot.git
synced 2025-04-25 15:06:41 +07:00
added argument parser
This commit is contained in:
parent
e3bf4fef86
commit
51fe9160ca
6 changed files with 45 additions and 2 deletions
9
src/utils/args.ts
Normal file
9
src/utils/args.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
import yargs from 'yargs'
|
||||
|
||||
const { hideBin } = require('yargs/helpers')
|
||||
|
||||
export type CmdArgument = 'config';
|
||||
|
||||
export const getCmdArg = (name: CmdArgument) => (
|
||||
yargs(hideBin(process.argv)).argv[name] as string | undefined
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue