We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d58dc3 commit 968ded5Copy full SHA for 968ded5
lib/commands/generate.ts
@@ -0,0 +1,25 @@
1
+import { run } from '@nativescript/schematics-engine';
2
+
3
+export class GenerateCommand implements ICommand {
4
+ public allowedParameters: ICommandParameter[] = [];
5
6
+ constructor(private $logger: ILogger, private $errors: IErrors) {}
7
8
+ public async execute(args: string[]): Promise<void> {
9
+ try {
10
+ await run({
11
+ logger: this.$logger,
12
+ schematic: 'component',
13
+ schematicOptions: {
14
+ name: 'random',
15
+ // project: 'web-mobile-project'
16
+ },
17
+ directory: process.cwd(),
18
+ });
19
+ } catch (error) {
20
+ this.$errors.failWithoutHelp(error.message);
21
+ }
22
23
+}
24
25
+$injector.registerCommand("generate", GenerateCommand);
0 commit comments