Skip to content

Kozmonos/commander2documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published