UNPKG

@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

52 lines (34 loc) 1.55 kB
#!/usr/bin/env node import yargs from 'yargs'; import { hideBin } from 'yargs/helpers'; import { ConfigurationCommand } from './src/configure/configuration-command.js'; import { InterpretationCommand } from './src/interpret/interpretation-command.js'; import { PublicationCommand } from './src/publish/publication-command.js'; import { ExpositionCommand } from './src/expose/exposition-command.js'; import { CurationCommand } from './src/curate/curation-command.js'; import { RecordationCommand } from './src/record/recordation-command.js'; import { CompositionCommand } from './src/compose/composition-command.js'; import { GenerationCommand } from './src/generate/generation-command.js'; let commands = yargs(hideBin(process.argv)) .parserConfiguration({ "parse-numbers": false, }) .scriptName('dsfr'); const recordation = new RecordationCommand() commands = recordation.add(commands); const configuration = new ConfigurationCommand(); commands = configuration.add(commands); const generation = new GenerationCommand(); commands = generation.add(commands); const composition = new CompositionCommand(); commands = composition.add(commands); /** documentation **/ const curation = new CurationCommand(); commands = curation.add(commands); const interpretation = new InterpretationCommand(); commands = interpretation.add(commands); const publication = new PublicationCommand(); commands = publication.add(commands); const exposition = new ExpositionCommand() commands = exposition.add(commands); commands = commands.help().argv;