1.0.1 • Published 3 years ago
command-line-args-loader v1.0.1
CommandLineArgs Loader
CommandLineArgs로 입력한 환경변수를 여러분이 지정한 타입에 맞춰 들고와 변환해주는 모듈입니다.
Badges
Usage
npm config set registry https://npm.rhea-so.com/
npm i @rhea-so/command-line-args-loader
import { Column, LoadCommandLineArgs } from '@rhea-so/command-line-args-loader';
@LoadCommandLineArgs()
export class CommandLineArgs {
@Column()
static NAME: string = 'rhea'; // Default value is 'rhea'
@Column()
static MATH_SCORE: number; // Default value is undefiend
}
console.log(CommandLineArgs.NAME); // rhea
console.log(CommandLineArgs.MATH_SCORE); // undefined
tsc
node dist/index.js # rhea, undefined
node dist/index.js --NAME="test" --MATH_SCORE=123 # test, 123
Configuration & Setup
Project Cloning
git clone https://github.com/rhea-so/CommandLineArgsLoader
cd 08_CommandLineArgsLoader
npm config set registry https://npm.rhea-so.com/
npm i
Build
tsc
Test
npm test
Get Test Coverage
npm run coverage
Documentation
Contribute
부탁드립니다. 이 프로젝트는 여러분의 기여를 바라고 있습니다. 기여를 해주세요.
기여를 하는 법은 크게 어렵지 않습니다!!
Questions
- GitHub - open issue
- Email - jeonghyeon.rhea@gmail.com