legal-markdown-js
Version:
Node.js implementation of LegalMarkdown for processing legal documents with markdown and YAML - Complete feature parity with Ruby version
28 lines โข 1.05 kB
JavaScript
/**
* @fileoverview Output format selection prompt for Interactive CLI
*/
import { checkbox } from '@inquirer/prompts';
/**
* Prompt user to select output formats
*/
export async function selectOutputFormats() {
const selectedFormats = await checkbox({
message: 'Select output formats:',
choices: [
{ name: '๐ HTML', value: 'html' },
{ name: '๐ PDF', value: 'pdf', checked: true }, // Default selected
{ name: '๐งพ DOCX', value: 'docx' },
{ name: '๐ Markdown', value: 'markdown' },
{ name: '๐ Export metadata (YAML/JSON)', value: 'metadata' },
],
required: true, // This ensures at least one option is selected
});
return {
html: selectedFormats.includes('html'),
pdf: selectedFormats.includes('pdf'),
docx: selectedFormats.includes('docx'),
markdown: selectedFormats.includes('markdown'),
metadata: selectedFormats.includes('metadata'),
};
}
//# sourceMappingURL=output-format.js.map