From 936cdff0813c4e6074ef1b2f3e5ec144c1070fcf Mon Sep 17 00:00:00 2001 From: rosen-vladimirov Date: Mon, 13 May 2019 16:37:46 +0300 Subject: [PATCH] fix: plugin create command needs more args for plugin seed There are two new prompts in the plugin seed which require new command line options to be passed from CLI. Handle the new prompts and pass the new options. They can be used in automation scripts. In order to prevent such issue in the future, ensure the spawned process's stdout and stdin are inherited, so if there's a prompt in the plugin seed, CLI will show it to the user. --- .../man_pages/lib-management/plugin-create.md | 2 + lib/commands/plugin/create-plugin.ts | 33 +++++++-- lib/declarations.d.ts | 2 + lib/options.ts | 2 + test/plugin-create.ts | 67 +++++++++++++++++-- test/stubs.ts | 12 +++- 6 files changed, 103 insertions(+), 15 deletions(-) diff --git a/docs/man_pages/lib-management/plugin-create.md b/docs/man_pages/lib-management/plugin-create.md index bfa6d6f7ad..b267887ade 100644 --- a/docs/man_pages/lib-management/plugin-create.md +++ b/docs/man_pages/lib-management/plugin-create.md @@ -28,6 +28,8 @@ Create from a custom plugin seed | `$ tns plugin create * `--path` - Specifies the directory where you want to create the project, if different from the current directory. * `--username` - Specifies the Github username, which will be used to build the URLs in the plugin's package.json file. * `--pluginName` - Used to set the default file and class names in the plugin source. +* `--includeTypeScriptDemo` - Specifies if TypeScript demo should be created. Default value is `y` (i.e. `demo` will be created), in case you do not want to create this demo, pass `--includeTypeScriptDemo=n` +* `--includeAngularDemo` - Specifies if Angular demo should be created. Default value is `y` (i.e. `demo-angular` will be created), in case you do not want to create this demo, pass `--includeAngularDemo=n` * `--template` - Specifies the custom seed archive, which you want to use to create your plugin. If `--template` is not set, the NativeScript CLI creates the plugin from the default NativeScript Plugin Seed. `