Skip to content

Commit

Permalink
chore: small README template fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Nov 8, 2024
1 parent 9df912a commit 18b70e9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ createOrFindDir(projectDir).then(async () => {
type: "multiselect",
name: "others",
message: "Select others tools: (Space to select, Enter to continue)",
choices: ["Husky"],
choices: ["Jobify", "Husky"],
});
preferences.others = others;

Expand Down
21 changes: 12 additions & 9 deletions src/templates/readme.md.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const links: Record<
| PreferencesType["database"]
| "Fluent2ts",
"None"
>,
> | "Docker",
string
> = {
GramIO: "[GramIO](https://gramio.dev/)",
Expand All @@ -28,14 +28,14 @@ const links: Record<
Session: "[Session](https://gramio.dev/plugins/official/session.html)",
Autoload: "[Autoload](https://gramio.dev/plugins/official/autoload.html)",
Prompt: "[Prompt](https://gramio.dev/plugins/official/prompt.html)",
"Auto-retry":
"[Auto-retry](https://gramio.dev/plugins/official/auto-retry.html)",
"Media-cache":
"[Media-cache](https://gramio.dev/plugins/official/media-cache.html)",
"Auto-retry": "[Auto-retry](https://gramio.dev/plugins/official/auto-retry.html)",
"Media-cache": "[Media-cache](https://gramio.dev/plugins/official/media-cache.html)",
I18n: "[I18n](https://gramio.dev/plugins/official/i18n.html)",
"Media-group":
"[Media-group](https://gramio.dev/plugins/official/media-group.html)",
"Media-group": "[Media-group](https://gramio.dev/plugins/official/media-group.html)",
Fluent2ts: "[Fluent2ts](https://github.com/kravetsone/fluent2ts)",
Scenes: "[Scenes](https://gramio.dev/plugins/official/scenes)",
Jobify: "[Jobify](https://github.com/kravetsone/jobify)",
Docker: "[Docker](https://www.docker.com/)"
};

export function getReadme({
Expand All @@ -45,19 +45,22 @@ export function getReadme({
database,
plugins,
others,
docker,
i18nType
}: Preferences) {
const stack = [];

stack.push(`- Telegram Bot API framework - ${links.GramIO}`);
if (linter !== "None") stack.push(`- Linter - ${links[linter]}`);
if (orm !== "None") stack.push(`- ORM - ${links[orm]} (${links[database]})`);
if (linter !== "None") stack.push(`- Linter - ${links[linter]}`);
if (plugins.length)
stack.push(`- GramIO plugins - ${plugins.map((x) => links[x]).join(", ")}`);
if (others.length || plugins.includes("I18n"))
stack.push(
`- Others tools - ${[
docker ? links.Docker : undefined,
...others.map((x) => links[x]),
plugins.includes("I18n") ? links.Fluent2ts : undefined,
i18nType === "Fluent" ? links.Fluent2ts : undefined,
]
.filter(Boolean)
.join(", ")}`,
Expand Down

0 comments on commit 18b70e9

Please sign in to comment.