UNPKG

996 BPlain TextView Raw
1import { Command, Blueprint, unwrap } from 'denali-cli';
2
3/**
4 * Remove scaffolded code from your app
5 *
6 * @package commands
7 */
8export default class DestroyCommand extends Command {
9
10 /* tslint:disable:completed-docs typedef */
11 static commandName = 'destroy';
12 static description = 'Remove scaffolded code from your app';
13 static longDescription = unwrap`
14 Removes the code generated during a \`denali generate\` command. Errs on the
15 side of caution when deleting code - it will only remove files that exactly
16 match the generated output. Modified files will be left untouched. `;
17
18 static params = '<blueprint>';
19
20 static flags = {
21 skipPostUninstall: {
22 description: "Don't run any post uninstall hooks for the blueprint",
23 default: false,
24 type: <any>'boolean'
25 }
26 };
27
28 protected static configureSubcommands(commandName: string, yargs: any, projectPkg: any): any {
29 return Blueprint.findAndConfigureBlueprints(yargs, 'destroy', projectPkg);
30 }
31
32}