UNPKG

797 BJavaScriptView Raw
1#!/usr/bin/env node
2
3var colors = require('colors')
4var util = require('util')
5var fs = require('fs')
6var path = require('path')
7var _ = require('underscore')
8
9var 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
19var yargs = require('yargs').usage('Usage: $0').help('help')
20yargs.wrap(yargs.terminalWidth())
21
22_.keys(commands).forEach(function(command) {
23 yargs.command(command, commands[command], require('./cli-'+command))
24})
25
26yargs.argv