1 | #!/usr/bin/env node
|
2 |
|
3 | /**
|
4 | * Command line interface of apeman-need.
|
5 | * This file is auto generated by ape-tmpl.
|
6 | */
|
7 |
|
8 | "use strict";
|
9 |
|
10 | const program = require('commander'),
|
11 | pkg = require('../package'),
|
12 | done = require('../lib/done'),
|
13 | apemanNeed = require('../lib');
|
14 |
|
15 | program
|
16 | .version(pkg['version'])
|
17 | .usage('[options] ')
|
18 | .description("Check project needs.")
|
19 | .option('-c, --configuration <configuration>', "Pathname of Apemanfile")
|
20 | ;
|
21 |
|
22 |
|
23 | //=========================
|
24 | // Show examples
|
25 | //=========================
|
26 | program.on('--help', () => {
|
27 | console.log(' Examples:');
|
28 | console.log('');
|
29 | console.log(' $ apeman-need # Check projects needs.');
|
30 | console.log('');
|
31 | });
|
32 |
|
33 | program.parse(process.argv);
|
34 |
|
35 |
|
36 | //=========================
|
37 | // Run main command
|
38 | //=========================
|
39 |
|
40 | apemanNeed.apply(apemanNeed, program.args.concat({
|
41 | configuration: program.configuration
|
42 | }).concat(done));
|