1
0
Fork 0
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:
Fedor Katurov 2021-04-07 17:56:52 +07:00
parent e3bf4fef86
commit 51fe9160ca
6 changed files with 45 additions and 2 deletions

9
src/utils/args.ts Normal file
View 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
)