UNPKG

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 868 B
#!/usr/bin/env node /** * Unified entry point for legal-md distribution binary. * * Routes to subcommands when called with a known first argument, * otherwise delegates to the standard CLI. * * Usage: * legal-md [options] [input] [output] - standard processing CLI * legal-md ui - interactive UI mode * legal-md playground - local web playground */ const [, , rawFirstArg] = process.argv; const firstArg = rawFirstArg?.startsWith('--') ? rawFirstArg.slice(2) : rawFirstArg; if (firstArg === 'ui') { process.argv.splice(2, 1); await import('./interactive/index.js'); } else if (firstArg === 'playground') { process.argv.splice(2, 1); const { main } = await import('./playground/index.js'); await main(); } else { await import('./index.js'); } export {}; //# sourceMappingURL=main.js.map