Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature/wikiRunnerCreateDevon4ngProject #183 #254

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Contributor

Choose a reason for hiding this comment

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

devonfw IDE


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