parse-params.js — react Source File
Architecture documentation for parse-params.js, a javascript file in the react codebase.
Entity Profile
Relationship Graph
Source Code
#!/usr/bin/env node
'use strict';
const commandLineArgs = require('command-line-args');
const {splitCommaParams} = require('../utils');
const paramDefinitions = [
{
name: 'dry',
type: Boolean,
description: 'Dry run command without actually publishing to NPM.',
defaultValue: false,
},
{
name: 'tags',
type: String,
multiple: true,
description: 'NPM tags to point to the new release.',
defaultValue: ['untagged'],
},
{
name: 'onlyPackages',
type: String,
multiple: true,
description: 'Packages to include in publishing',
defaultValue: [],
},
{
name: 'skipPackages',
type: String,
multiple: true,
description: 'Packages to exclude from publishing',
defaultValue: [],
},
{
name: 'ci',
type: Boolean,
description: 'Run in automated environment, without interactive prompts.',
defaultValue: false,
},
{
name: 'publishVersion',
type: String,
description: 'Version to publish',
},
];
module.exports = () => {
const params = commandLineArgs(paramDefinitions);
splitCommaParams(params.skipPackages);
splitCommaParams(params.onlyPackages);
splitCommaParams(params.tags);
params.tags.forEach(tag => {
switch (tag) {
case 'latest':
case 'canary':
case 'next':
case 'experimental':
case 'alpha':
case 'beta':
case 'rc':
case 'untagged':
break;
default:
console.error('Unsupported tag: "' + tag + '"');
process.exit(1);
break;
}
});
return params;
};
Domain
Subdomains
Functions
Source
Frequently Asked Questions
What does parse-params.js do?
parse-params.js is a source file in the react codebase, written in javascript. It belongs to the BabelCompiler domain, Optimization subdomain.
What functions are defined in parse-params.js?
parse-params.js defines 1 function(s): module.
Where is parse-params.js in the architecture?
parse-params.js is located at scripts/release/publish-commands/parse-params.js (domain: BabelCompiler, subdomain: Optimization, directory: scripts/release/publish-commands).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free