From d340733e2dd3a44e6886725f51e19d120959d499 Mon Sep 17 00:00:00 2001 From: derochs Date: Thu, 20 May 2021 14:37:33 +0200 Subject: [PATCH 1/3] Add feature/wikiRunnerCreateDevon4ngProject #183 --- runners/wikiConsole/index.ts | 7 +++++++ .../templates/createDevon4ngProject.asciidoc | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 runners/wikiConsole/templates/createDevon4ngProject.asciidoc diff --git a/runners/wikiConsole/index.ts b/runners/wikiConsole/index.ts index e2cb4390..aa19f3c3 100644 --- a/runners/wikiConsole/index.ts +++ b/runners/wikiConsole/index.ts @@ -124,5 +124,12 @@ export class WikiConsole extends WikiRunner { this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "createDevon4jProject.asciidoc"), { name: runCommand.command.parameters[0] }); return null; } + + runCreateDevon4ngProject(runCommand: RunCommand): RunResult { + let cdCommand = runCommand.command.parameters[1]; + let ngParams = runCommand.command.parameters.length > 2 && (runCommand.command.parameters[2] instanceof Array) ? runCommand.command.parameters[2].join(" ") : ""; + this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "createDevon4ngProject.asciidoc"), {cdCommand: cdCommand, projectName: runCommand.command.parameters[0], ngParams: ngParams}) + return null; + } } diff --git a/runners/wikiConsole/templates/createDevon4ngProject.asciidoc b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc new file mode 100644 index 00000000..f36ae65b --- /dev/null +++ b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc @@ -0,0 +1,17 @@ +== Create devon4ng project + +<% if (cdCommand) { %> + +=== Prerequisites + +The `angular-cli`, namely the `ng` command has to be available either by using the provided package from devonfw-ide or by installing it via the NPM package manager. + +As the project should be created at `<%= cdCommand; %>`, make sure that this directory exists before proceeding with the next step. + +<% } %> + +=== Creating the Angular project + +Use the `ng` command to create the project <%= projectName; %>: + +`devon ng create <%= projectName; %><% if(ngParams){ %><%= ngParams; %><% } %>` \ No newline at end of file From 0dae915d3da6ce92f1c590f158fd5e21f4158faf Mon Sep 17 00:00:00 2001 From: derochs Date: Fri, 28 May 2021 09:15:47 +0200 Subject: [PATCH 2/3] Update createDevon4ngProject.asciidoc --- runners/wikiConsole/templates/createDevon4ngProject.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runners/wikiConsole/templates/createDevon4ngProject.asciidoc b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc index f36ae65b..bf47ce5e 100644 --- a/runners/wikiConsole/templates/createDevon4ngProject.asciidoc +++ b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc @@ -4,7 +4,7 @@ === Prerequisites -The `angular-cli`, namely the `ng` command has to be available either by using the provided package from devonfw-ide or by installing it via the NPM package manager. +The `angular-cli`, namely the `ng` command has to be available either by using the provided package from devonfw IDE or by installing it via the NPM package manager. As the project should be created at `<%= cdCommand; %>`, make sure that this directory exists before proceeding with the next step. @@ -14,4 +14,4 @@ As the project should be created at `<%= cdCommand; %>`, make sure that this dir Use the `ng` command to create the project <%= projectName; %>: -`devon ng create <%= projectName; %><% if(ngParams){ %><%= ngParams; %><% } %>` \ No newline at end of file +`devon ng create <%= projectName; %><% if(ngParams){ %><%= ngParams; %><% } %>` From 3b6bac24c86e1da4eabb53597b7c71ce140ca3e9 Mon Sep 17 00:00:00 2001 From: derochs Date: Wed, 9 Jun 2021 15:39:52 +0200 Subject: [PATCH 3/3] Update createDevon4ngProject.asciidoc --- .../wikiConsole/templates/createDevon4ngProject.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runners/wikiConsole/templates/createDevon4ngProject.asciidoc b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc index bf47ce5e..2851582a 100644 --- a/runners/wikiConsole/templates/createDevon4ngProject.asciidoc +++ b/runners/wikiConsole/templates/createDevon4ngProject.asciidoc @@ -1,10 +1,10 @@ == Create devon4ng project -<% if (cdCommand) { %> - === Prerequisites -The `angular-cli`, namely the `ng` command has to be available either by using the provided package from devonfw IDE or by installing it via the NPM package manager. +* The `angular-cli`, namely the `ng` command has to be available either by using the provided package from devonfw IDE or by installing it via the NPM package manager. + +<% if (cdCommand) { %> As the project should be created at `<%= cdCommand; %>`, make sure that this directory exists before proceeding with the next step.