Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kaelzhang/comfort-legacy
Comfort is a much better node.js commander solution for sub commands, such as `git xxx` or `npm xxx`
https://github.com/kaelzhang/comfort-legacy
Last synced: 20 days ago
JSON representation
Comfort is a much better node.js commander solution for sub commands, such as `git xxx` or `npm xxx`
- Host: GitHub
- URL: https://github.com/kaelzhang/comfort-legacy
- Owner: kaelzhang
- License: other
- Created: 2013-06-15T12:44:04.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-03-09T08:54:55.000Z (over 8 years ago)
- Last Synced: 2024-04-15T12:32:57.120Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 95.7 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
[![NPM version](https://badge.fury.io/js/comfort.png)](http://badge.fury.io/js/comfort)
[![Build Status](https://travis-ci.org/kaelzhang/node-comfort.png?branch=master)](https://travis-ci.org/kaelzhang/node-comfort)
[![Dependency Status](https://gemnasium.com/kaelzhang/node-comfort.png)](https://gemnasium.com/kaelzhang/node-comfort)# comfort
Comfort is a much better node.js commander solution for sub commands.
If you have sub commands, such as ` `, comfort will be extremely helpful.
Comfort is designed to **make your code better organized and of scalability**, unlike [commander.js](https://github.com/visionmedia/commander.js).
If you want to create a complicated command tool with heavy arguments overloading, `comfort` will be your very choice.
## Features
#### Plugin support
A command-line application (`cortex` for example) and its sub-commands built with `comfort` are structured much like git(1).
To develop a new sub-command(`'blah'` for example) as a plugin(so you don't want to change the origin repository of `cortex`), just create a new node.js module, add a value to `bin` field of the package.json as:
```
{
"bin": {
"cortex-blah": "bin/xxxxx.js"
}
}
```
Comfort will look for `PATH` in your env, and search for a plugin command.#### Falling love with creating sub-commands
To add a new built-in command(`'haha'` for example), just add a file "haha.js" to the `options.command_root` directory, DONE!
#### Powerful argument parser
# Installation
```bash
npm install comfort --save
```# Getting Started
If you want to figure out how comfort works, well,
> Shut up, just show me the code!
and just see the annotations in the files under `root` directory.
Or, you could execute `comfort init` command, and see what happened to your new project.