mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
chore: config overhaul
This commit is contained in:
27
packages/docgen/bin/index.ts
Normal file
27
packages/docgen/bin/index.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env node
|
||||
/* eslint-disable n/shebang */
|
||||
import process from 'node:process';
|
||||
import { createCommand } from 'commander';
|
||||
import packageFile from '../package.json';
|
||||
import { build } from '../src/index.js';
|
||||
|
||||
export interface CLIOptions {
|
||||
custom: string;
|
||||
input: string[];
|
||||
output: string;
|
||||
root: string;
|
||||
typescript: boolean;
|
||||
}
|
||||
|
||||
const command = createCommand()
|
||||
.version(packageFile.version)
|
||||
.option('-i, --input <string...>', 'Source directories to parse JSDocs in')
|
||||
.option('-c, --custom <string>', 'Custom docs definition file to use')
|
||||
.option('-r, --root [string]', 'Root directory of the project', '.')
|
||||
.option('-o, --output <string>', 'Path to output file')
|
||||
.option('--typescript', '', false);
|
||||
|
||||
const program = command.parse(process.argv);
|
||||
const options = program.opts<CLIOptions>();
|
||||
|
||||
build(options);
|
||||
Reference in New Issue
Block a user