/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/docgen/bin/cli.js
55 строк
1 KB
Marco Ciampini
ESLint: Remove legacy import suppressions (#81338)
07 авг 2026, 15:52
Не верифицирован
07 авг 2026, 15:52
8181ec4
Код
Авторство
О чём код?
#!/usr/bin/env node const optionator = require( 'optionator' )( { prepend: 'Usage: node <path-to-docgen> <relative-path-to-entry-point>', options: [ { option: 'formatter', type: 'String', description: 'A custom function to format the generated documentation. By default, a Markdown formatter will be used.', }, { option: 'output', type: 'String', description: 'Output file to contain the API documentation.', }, { option: 'ignore', type: 'RegExp', description: 'A regular expression used to ignore symbols whose name match it.', }, { option: 'to-section', type: 'String', description: 'Append generated documentation to this section in the Markdown output. To be used by the default Markdown formatter.', dependsOn: 'output', }, { option: 'to-token', type: 'Boolean', description: 'Embed generated documentation within this token in the Markdown output. To be used by the default Markdown formatter.', dependsOn: 'output', }, { option: 'use-token', type: 'String', default: 'Autogenerated API docs', description: 'Add this string to the start/end tokens.', dependsOn: 'to-token', }, { option: 'debug', type: 'Boolean', default: false, description: 'Run in debug mode, which outputs some intermediate files useful for debugging.', }, ], } ); const docgen = require( '../lib' ); const options = optionator.parseArgv( process.argv ); process.exit( docgen( options._[ 0 ], options ) );