Skip to content

Commit

Permalink
fix: Remove obsoleted cli flags checker
Browse files Browse the repository at this point in the history
  • Loading branch information
spring-raining committed Jul 23, 2023
1 parent f7b371c commit 30ed466
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/input/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,6 @@ export async function mergeConfig<T extends CliFlags>(
? await composeSingleInputConfig(commonOpts, cliFlags, config)
: await composeProjectConfig(commonOpts, cliFlags, config, context);
debug('parsedConfig', parsedConfig);
checkUnusedCliFlags(parsedConfig, cliFlags);
return parsedConfig;
}

Expand Down Expand Up @@ -941,34 +940,3 @@ async function composeProjectConfig<T extends CliFlags>(
needToGenerateManifest: true,
};
}

export function checkUnusedCliFlags<T extends CliFlags>(
config: MergedConfig,
cliFlags: T,
) {
const unusedFlags: string[] = [];
if (!config.manifestPath) {
if (cliFlags.theme) {
unusedFlags.push('--theme');
}
if (cliFlags.title) {
unusedFlags.push('--title');
}
if (cliFlags.author) {
unusedFlags.push('--author');
}
if (cliFlags.language) {
unusedFlags.push('--language');
}
}
if (unusedFlags.length) {
log('\n');
unusedFlags.forEach((flag) => {
log(
`${chalk.bold.yellow(flag)}${chalk.bold.yellow(
` flag seems to be set but the current export setting doesn't support this. This option will be ignored.`,
)}`,
);
});
}
}

0 comments on commit 30ed466

Please sign in to comment.