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

Use different emoji for project create #17955

Merged
merged 1 commit into from
Jun 18, 2021
Merged
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
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
ebullient marked this conversation as resolved.
Show resolved Hide resolved

-----------
[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();
}
}