Skip to content

Commit 046e88e

Browse files
authored
Merge pull request devonfw-tutorials#247 from EduardKrieger/refactoring/spellingConvention
refactoring/spellingConventionAndHeadertypes
2 parents 5782eaf + 8f943ab commit 046e88e

11 files changed

+62
-78
lines changed

runners/wikiConsole/templates/buildJava.asciidoc

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
Build the Java Project with Maven
2-
=================================
1+
== Build the Java Project with Maven
2+
3+
=== Prerequisites
34

4-
Prerequisites
5-
~~~~~~~~~~~~~
65
* You need to have Maven installed. If not already installed, you can download it https://maven.apache.org/download.cgi[here]. Alternativly, you can make use of the devonfw-ide, where you can install Maven directly to your workspace. For more details on how to do that, see the https://devonfw.com/website/pages/docs/devonfw-ide-introduction.asciidoc.html#setup.asciidoc[devonfw-ide setup].
76

8-
Execution
9-
~~~~~~~~~
7+
=== Execution
8+
109
Now move to your project directory manually or by executing `cd <%= directoryPath; %>` in the terminal.
1110
Next, use the following command to build the java project.
1211

runners/wikiConsole/templates/buildNg.asciidoc

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
Build an Angular Project
2-
========================
1+
== Build an Angular Project
32

4-
Prerequisites
5-
~~~~~~~~~~~~~~
3+
4+
=== Prerequisites
65
* You need to have either installed the devonfw-ide with an Angular installation or installed https://angular.io/[Angular] seperatly on your system.
7-
* You need to have created or downloaded a Angular Project to a local directory.
6+
* You need to have created or downloaded a Angular project to a local directory.
87

98
For this tutorial navigate to the Angular directory by executing `cd <%= angularPath; %>` in your terminal.
109

11-
Execution
12-
~~~~~~~~~
10+
=== Execution
1311
<% if(outputPath){ %>
1412
If you want to compile the app to a custom output directory, you can execute the command `ng build --output-path <%= outputPath; %>`. The output path must me relative to your current workspace.
1513
<% } else { %>

runners/wikiConsole/templates/changeFile.asciidoc

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
=== Changing of <%= fileName; %> from command prompt
55

6-
7-
Changing a file can be done in an editor like VSCode or Eclipse. Another approach is to use the command prompt. We show how to insert, append or replace some data in a file using the command prompt on either Windows or Linux. First, you need to open a command prompt in your current Workspace. For Windows, you can use PowerShell and on Linux, you can use the Terminal.
6+
Changing a file can be done in an editor like VS Code or Eclipse. Another approach is to use the command prompt. We show how to insert, append or replace some data in a file using the command prompt on either Windows or Linux. First, you need to open a command prompt in your current Workspace. For Windows, you can use PowerShell and on Linux, you can use the Terminal.
87

98
.Operating system
109
. Windows +
@@ -16,7 +15,7 @@ We also use the command *Select-Object* to get just the required Strings from a
1615
<% }else if(lineNumber) {%> To insert <% if(contentPath) {%> text from the file *<%= contentFile; %>* <%}else{%> the string *<%= contentString; %>* <%}%> into the file *<%= fileName; %>* at specific line number you can execute the command `(Get-Content -Path <%= filePath; %> -TotalCount <%= lineNumber; %>) , <% if(contentPath){%>(Get-Content -Path <%= contentPath; %>)<%}else{%>"<%= contentString;%>"<% }%> ,(Get-Content -Path <%= filePath; %> |Select-Object -skip <%= lineNumber; %>) | Set-Content -Path <%= filePath; %>`
1716
<%}else{%>To append <%if(contentPath){ %>some data from the file *<%= contentFile; %>* <%}else{%>the string *<%= contentString; %>* <%}%>to the file *<%= fileName; %>* you can execute the command `Add-Content -Path <%= filePath; %> -Value <% if(contentPath){%>(Get-Content -Path <%= contentPath; %>)<%}else{%>"<%= contentString;%>"<% } %>`<% } %>
1817

19-
. Linux +
18+
. Linux and macOS +
2019
For the Linux Terminal, we use the commands *cat* and *sed*. We use cat to print the text to the terminal and redirect it as input for another file. Some more information about the functionality of cat can be found https://man7.org/linux/man-pages/man1/cat.1.html[here]. The command sed is a powerful command we use to insert and replace some data in a file. Some more information about the functionality of sed can be found https://linux.die.net/man/1/sed[here]. +
2120
<% if(placeholder) { %>To replace *<%= placeholder; %>* in the file *<%= fileName; %>* with<% if(contentPath){%> some text from another file *<%= contentFile; %>*<%}else{%> the string *<%= contentString; %>* <% } %> you can execute the command `sed s/<%= placeholder; %>/<% if(contentPath){ %>$(cat <%= contentPath; %>)<% }else{ %><%= contentString;%><% } %>/g <%= filePath;%>`
2221
<% }else if(lineNumber) {%>To insert <% if(contentPath) {%> a text from the file *<%= contentFile; %>* <% }else{ %> the string *<%= contentString; %>* <% } %> into the file *<%= fileName; %>* at specific line number you can execute the command `sed "<%= lineNumber; %>i <% if(contentPath){ %>$(cat <%= contentPath; %>)<% }else{ %><%= contentString; %><% } %>" <%= filePath; %>`

runners/wikiConsole/templates/cloneRepository.asciidoc

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
Clone Repository
2-
================
1+
== Clone Repository
32

4-
Prerequisites
5-
~~~~~~~~~~~~~
3+
=== Prerequisites
64
* You need to have Git installed. You can download Git https://git-scm.com/downloads[here] for your OS and install it by following the instructions.
75

8-
Download
9-
~~~~~~~~
6+
=== Download
107
Open a terminal in your current workspace.
118
<% if (directoryPath) { %>
129
Firstly, you have to move to the directory where the repository should be cloned to.
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Conclusion
2-
==========
1+
== Conclusion
2+
33

44
<%= conclusion; %>

runners/wikiConsole/templates/dockerCompose.asciidoc

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
Docker Compose
2-
=============
1+
== Docker Compose
32

43

5-
Prerequisites
6-
~~~~~~~~~~~~~~
4+
5+
=== Prerequisites
6+
77
* You need to install https://docs.docker.com/compose/install/#install-compose[Docker Compose] on your local machine.
88

9-
Starting Docker Compose Application
10-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9+
=== Starting Docker Compose Application
10+
1111

1212
Docker Compose can be used via your Terminal (Linux/MacOS) or Command Line (Windows). Change the directory to the location where the `docker-compose.yml` file for your application is located:
1313

@@ -22,8 +22,8 @@ If you would like to start the Docker Compose application in detached mode such
2222
`docker-compose up -d`
2323

2424
<% if(port){ %>
25-
Startup Assertion
26-
~~~~~~~~~~~~~~~~~~
25+
=== Startup Assertion
26+
2727

2828
In order to check if your application was started successfully, you can check if it's accessible on `localhost:<%= port; %>/<%app_path%>` either from your browser or by using the `curl` or `wget` programs.
2929

@@ -33,8 +33,8 @@ This command should return an `200 OK` header if the service is available.
3333

3434
<% } %>
3535

36-
Stopping Docker Compose Application
37-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+
=== Stopping Docker Compose Application
37+
3838

3939
If your application was started with the detached flag, you can stop it with the following command.
4040

Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
1-
Download a file
2-
===============
1+
== Download a file
32

4-
Download the file in a terminal
5-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
=== Download the file in a terminal
65
First, you need to open a command prompt in your current Workspace. For Windows, you can use Powershell and on Linux, you can use the Terminal.
76

8-
Prerequisites
9-
~~~~~~~~~~~~~
10-
The folder you want to load the file has to be existing. If the folder doesn't exist you can create it from terminal.
7+
=== Prerequisites
8+
* Existing folder you want to load the file. (If the folder doesn't exist you can create it from terminal.)
119

1210
.Operating system
1311
. Windows +
14-
Execute the command to create a folder if not already existing `if not exists <%= dir;%> mkdir <%= dir;%>`.
15-
. Linux +
12+
Execute the command to create a folder if not already existing `New-Item -ItemType Directory -Force -Path <%= dir; %>`.
13+
. Linux and macOS +
1614
Execute the command `mkdir -p <%= dir;%>`. The `-p` flag won't throw an error if the target folder already exists and allows the creation of parent directories.
1715

18-
Download
19-
~~~~~~~~
20-
16+
=== Download
2117
Now we can start to download the file with the *wget* command. You can read some information about the usage on Linux https://manpages.ubuntu.com/manpages/hirsute/en/man1/wget.1.html[here].
2218

2319
On Windows, we use the *Invoke-WebRequest* command but you can also use wget here. *Wget* on Windows is an alias for *Invoke-WebRequest* and mostly works like *wget* on Linux, detailed documentation can be found https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest?view=powershell-7.1[here].
@@ -28,5 +24,5 @@ On Windows, we use the *Invoke-WebRequest* command but you can also use wget her
2824
. Windows +
2925
The Windows command to download a file is `Invoke-WebRequest <%= url;%> -O <%= dir;%>/<%= fileName;%>` with the *-OutFile* parameter we set the name of the file to *file*, and the destination where the file will be saved.
3026

31-
. Linux +
27+
. Linux and macOS +
3228
The Linux command to download a file is `wget <%= url;%> -O <%= fileName;%> -P <%= dir;%>` with the *-O* parameter we set the name of the file to *file*, and with the *-P* parameter we set the folder where the file will be saved.

runners/wikiConsole/templates/installDevonfwIde.asciidoc

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
devonfw setup
2-
=============
1+
== devonfw setup
32

43

5-
Prerequisites
6-
~~~~~~~~~~~~~~
4+
5+
=== Prerequisites
6+
77
* You need to have a tool to extract `.tar.gz` files. On Windows lower Windows 10 use can use https://www.7-zip.org/7-zip[7-Zip]. The most other platforms support this feature by default.
88
* You need to have https://git-scm.com/[Git] and https://curl.se/[Curl] installed. On Windows you have to install https://git-scm.com/download/win[Git for Windows]. On Linux systems you might need to install the following tools in case they are not present (`sudo apt-get install git curl` or `sudo yum install git-core curl`)
99

1010
Create a new directory in the location where you want to install the devonfw IDE. If you are using the terminal, navigate to this location and run `mkdir devonfw` and `cd devonfw` to create the directory and navigate into it.
1111

12-
Download
13-
~~~~~~~~~
12+
=== Download
13+
1414

1515
<% if(version) {%>
1616

@@ -36,12 +36,12 @@ On MacOS, depending on your setup, you can either use the same `wget` command sp
3636

3737
After that you need to extract the downloaded file. To do this, run `tar -xvzf devonfw-ide-scripts.tar.gz`. Or you can simply use a tool (e.g. 7-Zip) for this.
3838

39-
Setup
40-
~~~~~~
39+
=== Setup
40+
4141
First, you need to prepare a settings repository to specify the tools to be installed within the devonfw IDE. Normally this is done by your project. If you just want to test the devonfw IDE, you can use the default URL, which is https://github.com/devonfw/ide-settings.
4242

4343
For now clone the repository on https://github.com/devonfw/ide-settings or your own fork of it.
4444
For this tutorial you have to write `DEVON_IDE_TOOLS=(<%= tools; %>)` into the devon.properties file of the cloned settings repository. These settings will now be passed into the installation process of the devonfw IDE.
4545
Start the setup process by executing `.\setup 'path/to/settings'` (Windows) or `bash setup path/to/settings.git` (Linux).
4646

47-
You can also just execute `.\setup` (Windows) or `bash setup` (Linux) and press Enter when the setup assistent asks for the URL to the settings repository. This will also download the default settings and install the default tools within the devonfw IDE.
47+
You can also just execute `.\setup` (Windows) or `bash setup` (Linux) and press Enter when the setup assistent asks for the URL to the settings repository. This will also download the default settings and install the default tools within the devonfw IDE.

runners/wikiConsole/templates/npmInstall.asciidoc

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
<% if(npmCommand.name){ %>
2-
Installation of package <%= npmCommand.name; %>
3-
===============================================
2+
== Installation of package <%= npmCommand.name; %>
3+
44
<% } else {%>
5-
Install dependencies
6-
====================
5+
== Install dependencies
76
<% } %>
87

9-
Prerequisites
10-
~~~~~~~~~~~~~~
8+
=== Prerequisites
9+
1110
* Install Node.js. You can download Node.js https://nodejs.org/en/download/[here].
1211
* Installed npm. You can download npm https://www.npmjs.com/get-npm[here] and follow the installation instructions.
1312

14-
Execution
15-
~~~~~~~~~
13+
=== Execution
1614
<% if(npmCommand.name){ %>
1715
You can install the package <%= npmCommand.name; %><% if(!npmCommand.global){ %> and add it to the dependencies<% } %>.<% } else {%>
1816
You need to be located in the project directory where the package.json file lies.

runners/wikiConsole/templates/runServerJava.asciidoc

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
Run Java Server
2-
================
1+
== Run Java Server
32

43

5-
Prerequisites
6-
~~~~~~~~~~~~~~
4+
5+
=== Prerequisites
76
* Maven (can be included in your devonfw environment)
87

9-
Starting the server
10-
~~~~~~~~~~~~~~~~~~~
8+
=== Starting the server
119

1210
First, change the current working directory to where your server is located, i.e. `cd <%= server_path; %>`.
1311

@@ -16,8 +14,7 @@ This command will start the Java server.
1614

1715
<% if(port){ %>
1816

19-
Startup Assertion
20-
~~~~~~~~~~~~~~~~~
17+
=== Startup Assertion
2118

2219
You can check if the server is running correctly by checking if `localhost:<%= port; %>/<%= app_path; %>` is accessible by either using a tool like `curl`, `Postman` or simply accessing the service via your webbrowser.
2320

runners/wikiVsCode/templates/changeFile.asciidoc

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
== Changing of the <%= fileName; %> File
22

3-
=== Changing of <%= fileName; %> in the VSCode Editor
3+
=== Changing of <%= fileName; %> in the VS Code Editor
44

55
<% if(contentPath) {%>
66
First, you want to open the file <%= contentFile; %> where you get the content from, you want to put into the <%= fileName; %>.
7-
Go to the file context menu in the top left corner right next to the VSCode symbol and choose *Open File...* or you can do this with the keyboard shortcut ctrl+o.
7+
Go to the file context menu in the top left corner right next to the VS Code symbol and choose *Open File...* or you can do this with the keyboard shortcut ctrl+o.
88
Based on your operating system a window with the file explorer opens. You have to navigate <%= contentFile; %> and select it. Select the right folder manually or by inserting the path `<%= contentPath; %>` into the path bar, so you can jump into the right folder and select the file `<%= contentFile; %>`.
99
You confirm this with the *Open* button in the bottom right corner.
10-
The file will be opened in a new VSCode editor window where you can select the whole text with the keyboard shortcut ctrl+a or just select the text you want to copy and copy the text with ctrl+c.<% } %>
10+
The file will be opened in a new VS Code editor window where you can select the whole text with the keyboard shortcut ctrl+a or just select the text you want to copy and copy the text with ctrl+c.<% } %>
1111

12-
To change the file <%= fileName; %>, you have to open it in VSCode.
13-
Open VSCode and choose in the file context menu in the top left corner right next to the VSCode symbol *Open File...* or just use the keyboard shortcut ctrl+o.
12+
To change the file <%= fileName; %>, you have to open it in VS Code.
13+
Open VS Code and choose in the file context menu in the top left corner right next to the VS Code symbol *Open File...* or just use the keyboard shortcut ctrl+o.
1414
Based on your operating system a window with the file explorer opens. You have to navigate to <%= fileName; %> and select it. Select the right folder manually or by inserting the path `<%= filePath; %>` into the path bar, so you can jump into the right folder and select the file `<%= fileName; %>`.
1515
You confirm this with the *Open* button in the bottom right corner.
16-
The file will be opened in a new VSCode editor window.
16+
The file will be opened in a new VS Code editor window.
1717

1818
<% if(contentString) { %>Now we can copy the content *<%= contentString; %>* with ctrl+c we want to insert into <%= fileName; %>. <% } %>
1919
<% if(lineNumber) { %>Inserting the content into a specific line number can be done by a left mouse click into the line *<%= lineNumber%>* and using the keyboard shortcut ctrl+v.

0 commit comments

Comments
 (0)