Roaders / ts-command-line-args

A typescript wrapper for command-line-args that allow you to generate config from existing TS interfaces
26 stars 11 forks source link

feat: add option for process exit code #23

Closed andrei-bitca-dc closed 2 years ago

andrei-bitca-dc commented 2 years ago

Adds exit code for process. Currently, it exits with error code 0.

codecov-commenter commented 2 years ago

Codecov Report

Merging #23 (d95d3eb) into master (7cf0634) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #23   +/-   ##
=======================================
  Coverage   94.95%   94.95%           
=======================================
  Files          11       11           
  Lines        1189     1189           
  Branches      256      204   -52     
=======================================
  Hits         1129     1129           
  Misses         60       60           
Impacted Files Coverage Δ
src/parse.ts 95.60% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7cf0634...d95d3eb. Read the comment docs.

Roaders commented 2 years ago

Thanks for the submission. I've extended your changes a little bit by accepting a number or accepting a function that will determine the exit code based on the reasons for exit and what args are missing and what has already been passed. This is currently releasing as version 2.2.0

andrei-bitca-dc commented 2 years ago

Great, thank you @Roaders!