Skip to content

Commit

Permalink
Merge pull request #17955 from ebullient/cli-emoji
Browse files Browse the repository at this point in the history
Use different emoji for project create
  • Loading branch information
ebullient authored Jun 18, 2021
2 parents 5b1cfac + cd1e0e0 commit 4237cbd
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
19 changes: 10 additions & 9 deletions docs/src/main/asciidoc/cli-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,24 @@ $ quarkus create
-----------

applying codestarts...
🔠 java
🧰 maven
🗃 quarkus
📜 config-properties
🛠 dockerfiles
🛠 maven-wrapper
🐒 resteasy-codestart
📚 java
🔨 maven
📦 quarkus
📝 config-properties
🔧 dockerfiles
🔧 maven-wrapper
📄 resteasy-codestart

-----------
[SUCCESS] ✅ quarkus project has been successfully generated in:
--> /<output-dir>/code-with-quarkus
----

This will create a folder called 'code-with-quarkus' in your current working directory
using default groupId, artifactId and version values
This will create a folder called 'code-with-quarkus' in your current working directory using default groupId, artifactId and version values
(groupId='org.acme', artifactId='code-with-quarkus' and version='1.0.0-SNAPSHOT').

Note: the emoji shown above may not match precisely. The appearance of emoji can vary by font, and terminal/environment. IntelliJ IDEA, for example, has several long-running issues open regarding the behavior/rendering of emoji in the terminal.

To specify the groupId, artifactId and version values,
use the '--group-id', '--artifact-id' and '--version' options:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import io.smallrye.common.os.OS;

public enum CodestartType {
LANGUAGE(true, 1, "\uD83D\uDD20"),
BUILDTOOL(true, 2, "\uD83E\uDDF0"),
PROJECT(true, 3, "\uD83D\uDDC3"),
CONFIG(true, 4, "\uD83D\uDCDC"),
TOOLING(false, 5, "\uD83D\uDEE0"),
CODE(false, 6, "\uD83D\uDC12"),
LANGUAGE(true, 1, toEmoji("U+1F4DA")),
BUILDTOOL(true, 2, toEmoji("U+1F528")),
PROJECT(true, 3, toEmoji("U+1F4E6")),
CONFIG(true, 4, toEmoji("U+1F4DD")),
TOOLING(false, 5, toEmoji("U+1F527")),
CODE(false, 6, toEmoji("U+1F4C4")),
;

private final boolean base;
Expand All @@ -32,4 +32,18 @@ public String getIcon() {
public int getProcessingOrder() {
return processingOrder;
}

// Simplify life so we can just understand what emojis we are using
static String toEmoji(String text) {
String[] codes = text.replace("U+", "0x").split(" ");
final StringBuilder stringBuilder = new StringBuilder();
for (String code : codes) {
final Integer intCode = Integer.decode(code.trim());
for (Character character : Character.toChars(intCode)) {
stringBuilder.append(character);
}
}
stringBuilder.append(' ');
return stringBuilder.toString();
}
}

0 comments on commit 4237cbd

Please sign in to comment.