@kozmonos/commander2documentation

0.1.1 • Public • Published

🚀 CommanderJS To Documentation

This is a simple tool to generate documentation from your commanderjs commands.

CommanderJS to documentation

CommanderJS To Documentation Usage

const commander2documentation = require('@kozmonos/commander2documentation');

//-------------------------------------
// create program

const { Command,program } = require('commander');
const actions = require('./actions');

program
	.description('Kozmonos developer cli tool')
	.version('1.0.0');

program
	.command('test')
	.description('test command')
	.action(actions.test)


const subCommand=new Command('sub')

subCommand
	.command('test2')
	.description('test command 2')
	.option('-o, --out <path>')
	.action(actions.test2)

//-------------------------------------
//program to doc

const app=new commander2documentation(program)
const response=app.build({
	bin: "kozmonos",
	output: "./dist"
})

Support Us

Patreon Buy Me A Coffe Kofi Liberapay Github Sponsor Open Collective

Communicate

Telegram Mail

Package Sidebar

Install

npm i @kozmonos/commander2documentation

Weekly Downloads

6

Version

0.1.1

License

ISC

Unpacked Size

476 kB

Total Files

43

Last publish

Collaborators

  • onuraycicek