MCPcopy
hub / github.com/streamich/git-cz / parseArgs

Function parseArgs

lib/parseArgs.js:29–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27`;
28
29const parseArgs = () => {
30 const {
31 // eslint-disable-next-line no-unused-vars
32 _: inputs,
33 'dry-run': dryRun,
34 hook,
35 'disable-emoji': disableEmoji,
36 format,
37 'non-interactive': nonInteractive,
38 body,
39 breaking,
40 issues,
41 lerna,
42 scope,
43 subject,
44 type,
45 help,
46 h,
47 version,
48 v,
49 ...passThroughParams
50 } = minimist(process.argv.slice(2), {
51 alias: {
52 h: 'help',
53 v: 'version'
54 },
55 boolean: [
56 'version',
57 'help',
58 'disable-emoji',
59 'non-interactive',
60 'hook',
61 'dry-run'
62 ],
63 string: [
64 'format',
65 'type',
66 'subject',
67 'scope',
68 'body',
69 'breaking',
70 'issues',
71 'learna'
72 ]
73 });
74
75 if (help || h) {
76 console.log(helpScreen);
77 process.exit();
78 }
79
80 if (version || v) {
81 console.log(pkg.version);
82 process.exit();
83 }
84
85 const cliOptions = {
86 disableEmoji,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…