Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions runners/wikiConsole/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

17 changes: 17 additions & 0 deletions runners/wikiConsole/templates/createDevon4ngProject.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
== Create devon4ng project

<% if (cdCommand) { %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this to line 8


=== 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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use * to format the prerequisites


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; %><% } %>`