1 | import { Command, Blueprint, unwrap } from 'denali-cli';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export default class GenerateCommand extends Command {
|
9 |
|
10 |
|
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 | }
|