@nianyi-wang/cli
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

cli-js

This is a NodeJS package for quickly implementing a CLI interface for your application. It is written in the ES Module style.

Installation

$ npm i @nianyi-wang/cli

Usage

import { CLI } from '@nianyi-wang/cli';

new CLI({
	options: [
		{
			name: 'out',
			shortNames: 'o',
			argumentCount: 1
		},
	],
	handler() {
		const inSrc = this.arguments[0];
		const outSrc = this.GetSingle('out');
		console.log(`${inSrc} => ${outSrc}`);
	}
}).Execute();

Readme

Keywords

none

Package Sidebar

Install

npm i @nianyi-wang/cli

Weekly Downloads

1

Version

0.0.1

License

none

Unpacked Size

8.41 kB

Total Files

10

Last publish

Collaborators

  • nianyi-wang