| 12345678910111213141516171819202122232425262728293031323334353637 |
- import {readFileSync} from 'fs';
- const pkg = JSON.parse(readFileSync(
- new URL('../package.json', import.meta.url)
- ));
- /* eslint-disable jsdoc/require-property -- Schema is already below */
- /**
- * @typedef {PlainObject} CoveradgeOptions
- */
- /* eslint-enable jsdoc/require-property -- Schema is already below */
- const optionDefinitions = [
- {
- name: 'date', alias: 'd', type: String, defaultOption: true,
- description: 'Gregorian date (parseable by `Date`) to convert to ' +
- 'Badí\' date (or empty to get today\'s date).',
- typeLabel: '{underline date}'
- },
- {
- name: 'verbose', type: Boolean,
- description: 'Whether to provide an entire JSON object with full details.'
- }
- ];
- const cliSections = [
- {
- // Add italics: `{italic textToItalicize}`
- content: pkg.description +
- '\n\n{italic bahai-date [--verbose] [aDate]}'
- },
- {
- optionList: optionDefinitions
- }
- ];
- export {optionDefinitions as definitions, cliSections as sections};
|