UNPKG

972 BPlain TextView Raw
1import { Command, Blueprint, unwrap } from 'denali-cli';
2
3/**
4 * Scaffold code for your app.
5 *
6 * @package commands
7 */
8export default class GenerateCommand extends Command {
9
10 /* tslint:disable:completed-docs typedef */
11 static commandName = 'generate';
12 static description = 'Scaffold code for your app.';
13 static longDescription = unwrap`
14 Usage: denali generate <blueprint> [options]
15
16 Generates code from the given blueprint. Blueprints are templates used by the
17 generate command, but they can go beyond simple templating (i.e. installing
18 addons).
19 `;
20
21 static params = '<blueprint>';
22
23 static flags = {
24 skipPostInstall: {
25 description: "Don't run any post install hooks for the blueprint",
26 default: false,
27 type: <any>'boolean'
28 }
29 };
30
31 protected static configureSubcommands(commandName: string, yargs: any, projectPkg: any): any {
32 return Blueprint.findAndConfigureBlueprints(yargs, 'generate', projectPkg);
33 }
34
35}