Skip to content

Commit d340733

Browse files
committed
Add feature/wikiRunnerCreateDevon4ngProject devonfw-tutorials#183
1 parent b567257 commit d340733

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

runners/wikiConsole/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -124,5 +124,12 @@ export class WikiConsole extends WikiRunner {
124124
this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "createDevon4jProject.asciidoc"), { name: runCommand.command.parameters[0] });
125125
return null;
126126
}
127+
128+
runCreateDevon4ngProject(runCommand: RunCommand): RunResult {
129+
let cdCommand = runCommand.command.parameters[1];
130+
let ngParams = runCommand.command.parameters.length > 2 && (runCommand.command.parameters[2] instanceof Array) ? runCommand.command.parameters[2].join(" ") : "";
131+
this.renderWiki(path.join(this.getRunnerDirectory(), "templates", "createDevon4ngProject.asciidoc"), {cdCommand: cdCommand, projectName: runCommand.command.parameters[0], ngParams: ngParams})
132+
return null;
133+
}
127134
}
128135

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
== Create devon4ng project
2+
3+
<% if (cdCommand) { %>
4+
5+
=== Prerequisites
6+
7+
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.
8+
9+
As the project should be created at `<%= cdCommand; %>`, make sure that this directory exists before proceeding with the next step.
10+
11+
<% } %>
12+
13+
=== Creating the Angular project
14+
15+
Use the `ng` command to create the project <%= projectName; %>:
16+
17+
`devon ng create <%= projectName; %><% if(ngParams){ %><%= ngParams; %><% } %>`

0 commit comments

Comments
 (0)