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 all 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
5 changes: 5 additions & 0 deletions runners/wikiConsole/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ 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})
mustafaokyay marked this conversation as resolved.
Show resolved Hide resolved

runAddSetupScript(runCommand: RunCommand): RunResult{
let scriptNameLinux = path.basename(runCommand.command.parameters[0]);
Expand Down
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

=== 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.

<% if (cdCommand) { %>

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