MCPcopy Create free account
hub / github.com/decaporg/decap-cms / parseArgs

Function parseArgs

scripts/ga-preflight.mjs:31–43  ·  view source on GitHub ↗
(argv)

Source from the content-addressed store, hash-verified

29}
30
31function parseArgs(argv) {
32 const options = { remote: 'origin' };
33 for (const arg of argv) {
34 if (arg === '--no-remote') {
35 options.remote = null;
36 } else if (arg.startsWith('--remote=')) {
37 options.remote = arg.slice('--remote='.length);
38 } else {
39 throw new Error(`Unknown argument: ${arg}`);
40 }
41 }
42 return options;
43}
44
45function getPublishablePackages() {
46 return JSON.parse(run('pnpm', ['-r', 'ls', '--depth', '-1', '--json']))

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected