cspell
Version:
A Spelling Checker for Code!
18 lines • 983 B
JavaScript
import { collect, crOpt } from './commandHelpers.js';
import { updateConfig } from './config/updateConfig.js';
export function commandInit(prog) {
const command = prog
.command('config')
.description('Update a CSpell configuration file.')
.option('-c, --config <path>', 'Path to the CSpell configuration file.')
.option('--import <path|package>', 'Import a configuration file or dictionary package.', collect)
.option('--locale <locale>', 'Define the locale to use when spell checking (e.g., en, en-US, de).')
.addOption(crOpt('--dictionary <dictionary>', 'Enable a dictionary.', collect).default(undefined))
.addOption(crOpt('--comments', 'Add comments to the config file.').default(undefined).hideHelp())
.option('--no-comments', 'Do not add comments to the config file.')
.action((options) => {
return updateConfig(options);
});
return command;
}
//# sourceMappingURL=commandConfig.js.map