1 | #!/usr/bin/env node
|
2 |
|
3 | var colors = require('colors')
|
4 | var util = require('util')
|
5 | var fs = require('fs')
|
6 | var path = require('path')
|
7 | var _ = require('underscore')
|
8 |
|
9 | var commands = {
|
10 | 'controllers': 'Handles web controllers: labmda functions and their API resources',
|
11 | 'api': 'Handles basic API functionality with AWS',
|
12 | 'region': 'Use these commands to select an AWS region',
|
13 | 'init': 'Creates a structure for a new project',
|
14 | 'stage': 'Use these commands to select or create AWS API stages',
|
15 | 'role': 'Handles IAM roles',
|
16 | 'start': 'Start the development server',
|
17 | }
|
18 |
|
19 | var yargs = require('yargs').usage('Usage: $0').help('help')
|
20 | yargs.wrap(yargs.terminalWidth())
|
21 |
|
22 | _.keys(commands).forEach(function(command) {
|
23 | yargs.command(command, commands[command], require('./cli-'+command))
|
24 | })
|
25 |
|
26 | yargs.argv
|