From 099dd7e59cb9be5213666dc20615d2617d59c497 Mon Sep 17 00:00:00 2001 From: Todor Totev Date: Wed, 6 Jan 2016 08:48:37 +0200 Subject: [PATCH] Add command to generate HTML help Implements https://github.com/NativeScript/nativescript-cli/issues/1302 --- lib/bootstrap.ts | 1 + lib/commands/generate-help.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 lib/commands/generate-help.ts diff --git a/lib/bootstrap.ts b/lib/bootstrap.ts index d61bc3bc2b..b9961a6486 100644 --- a/lib/bootstrap.ts +++ b/lib/bootstrap.ts @@ -53,6 +53,7 @@ $injector.requireCommand("dev-test|ios", "./commands/test"); $injector.requireCommand("test|android", "./commands/test"); $injector.requireCommand("test|ios", "./commands/test"); $injector.requireCommand("test|init", "./commands/test-init"); +$injector.requireCommand("dev-generate-help", "./commands/generate-help"); $injector.require("npm", "./node-package-manager"); $injector.require("npmInstallationManager", "./npm-installation-manager"); diff --git a/lib/commands/generate-help.ts b/lib/commands/generate-help.ts new file mode 100644 index 0000000000..938c7f78ac --- /dev/null +++ b/lib/commands/generate-help.ts @@ -0,0 +1,14 @@ +/// +"use strict"; + +export class GenerateHelpCommand implements ICommand { + constructor(private $htmlHelpService: IHtmlHelpService) { + } + + public allowedParameters: ICommandParameter[] = []; + + public execute(args: string[]): IFuture { + return this.$htmlHelpService.generateHtmlPages(); + } +} +$injector.registerCommand("dev-generate-help", GenerateHelpCommand);