@gouvfr/dsfr-nexus
Version:
Le module `dsfr-nexus` est l'interface de ligne de commande (CLI) centrale du Système de Design de l’État - DSFR. Il offre des outils pour gérer et compiler les ressources du DSFR
34 lines (26 loc) • 756 B
JavaScript
import { Command, CommandOption } from '../common/command.js';
import { Interpretation } from './interpretation.js';
class InterpretationCommand extends Command{
constructor () {
super('interpret', 'Interpretation des markdown');
}
get usage () {
return ' -p <part> <part>';
}
get example () {
return 'interprète les markdown pour les parties spécifiées';
}
get options () {
return [
new CommandOption('parts', 'limite l\'interprétation aux parties listées', 'array', 'p')
];
}
async handler (argv) {
const settings = {
partIds: argv.parts ?? null
};
const interpretation = new Interpretation();
await interpretation.interpret(settings);
}
}
export { InterpretationCommand };