commist

WebJar for commist

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

commist
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

commist
WebJar for commist
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/mcollina/commist

Скачать commist

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/commist/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>commist</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/commist/
implementation 'org.webjars.npm:commist:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/commist/
implementation ("org.webjars.npm:commist:1.0.0")
'org.webjars.npm:commist:jar:1.0.0'
<dependency org="org.webjars.npm" name="commist" rev="1.0.0">
  <artifact name="commist" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='commist', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "commist" % "1.0.0"
[org.webjars.npm/commist "1.0.0"]

Зависимости

compile (2)

Идентификатор библиотеки Тип Версия
org.webjars.npm : leven jar [1.0.0,2)
org.webjars.npm : minimist jar [1.1.0,2)

Модули Проекта

Данный проект не имеет модулей.

commist

Build Status

Build command line application with multiple commands the easy way. To be used with minimist.

var program = require('commist')()
  , minimist = require('minimist')
  , result

result = program
  .register('abcd', function(args) {
    console.log('just do', args)
  })
  .register({ command: 'restore', equals: true }, function(args) {
    console.log('restore', args)
  })
  .register('args', function(args) {
    args = minimist(args)
    console.log('just do', args)
  })
  .register('abcde code', function(args) {
    console.log('doing something', args)
  })
  .register('another command', function(args) {
    console.log('anothering', args)
  })
  .parse(process.argv.splice(2))

if (result) {
  console.log('no command called, args', result)
}

When calling commist programs, you can abbreviate down to three char words. In the above example, these are valid commands:

node example.js abc
node example.js abc cod
node example.js anot comm

Moreover, little spelling mistakes are corrected too:

node example.js abcs cod

If you want that the command must be strict equals, you can register the command with the json configuration:

  program.register({ command: 'restore', strict: true }, function(args) {
    console.log('restore', args)
  })

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Версии библиотеки

Версия
1.0.0