0.1.4-2-beta • Published 10 years ago

eoptimist v0.1.4-2-beta

Weekly downloads
50
License
-
Repository
github
Last release
10 years ago

Eoptimist - Extended optimist

Version 0.1.4-1-beta

Note: Please consider using Easy CLI instead. Easy CLI is a project which emerged from this one.

Additions

  • Automatically scans (if exists) package.json file and adds --version (alias --info) CLI option that displays string:

    		// e.g. "example-program 0.1.0"
    		package.json.name + " " + package.json.version
  • Automatically scans (if exists) CLI.yaml file and generate --usage (alias --help) CLI option using CLI.yaml keys.

    	Example:
    
    	We have `./CLI.yaml`, `./example-program.js` which is node application with `eoptimist` installed (i.e. we have executed `./npm install optimist`).
    
    		/* example-program.js */
    
    		// same as require('optimist').argv
    		var argv = require('eoptimist').argv
    
    	--
    
    		# CLI.yaml
    		name: example-program.js
    		usage: example-program.js [options] [file]
    		options:
    		  h4x:
    		    alias: h
    		    description: omgh4x
    		  wat:
    		    alias:
    		      - is
    		      - dis
    		    description: []
    		    boolean: true
    		  include FILE:
    		    description: My awesome description.
    		examples:
    		  - node example-program.js --h4x awesome.js
    		  - node example-program.js --include file.js
    
    	--
    
    		$ node example-program.js --usage
    
    		Usage: example-program.js [options] [file]
    
    		Options:
    		  --version, --info   Display current version                          [boolean]
    		  --usage, --help     Display help                                     [boolean]
    		  --h4x, -h           omgh4x
    		  --wat, --is, --dis                                                   [boolean]
    		  --include FILE      My awesome description.
    		Examples:
    		  node example-program.js --h4x awesome.js
    		  node example-program.js --include file.js
    
    --
    
    		$ node example-program.js --version
    		example-program 0.1.0

Installation

npm install eoptimist

or

git clone https://github.com/jan-swiecki/node-eoptimist
mkdir node_modules
mv node-eoptimist node_modules/eoptimist
cd node_modules/eoptimist
npm install

(On windows use move instead of mv)

0.1.4-2-beta

10 years ago

0.1.4-1-beta

12 years ago

0.1.3

12 years ago

0.1.2-3

12 years ago

0.1.2-2

12 years ago

0.1.2-1

12 years ago

0.1.2

12 years ago

0.1.1-6

12 years ago

0.1.1-5

12 years ago

0.1.1-4

12 years ago

0.1.1-3

12 years ago

0.1.1-2

12 years ago

0.1.1-1

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago