forked from equinix/api-catalog-organizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
21 lines (15 loc) · 738 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env node
'use strict';
var program = require('commander');
var pkginfo = require('pkginfo')(module, 'version', 'description');
var logo = require('./lib/logo');
program
.version(module.exports.version)
.command('extract', 'extract API endpoints from a Swagger document using a tag')
.command('param', 'allows to add/remove a parameter (header or query). use "add" and "remove" sub commands')
.command('prepend', 'allows to modify API endpoints by prepending an arbitrary text (like version number: "/v1")');
//if program was called with no arguments, show help.
if (process.argv.slice(2).length === 0) {
logo.display(module.exports.description, module.exports.version);
}
program.parse(process.argv);