fix(generator): update generator

This commit is contained in:
thomas
2023-10-14 21:07:15 +02:00
parent e8bf7cbe43
commit 33a718307c
4 changed files with 19 additions and 26 deletions

View File

@@ -1,6 +1,9 @@
---
title: <%= difficulty %> <%= title %>
description: Challenge <%= challengeNumber %> is about ...
author: <%= author %>
challengeNumber: <%= challengeNumber %>
command: <%= appProjectName %>
sidebar:
order: <%= order %>
badge: New
@@ -10,33 +13,9 @@ sidebar:
WIP: The following documentation need to be written.
:::
<div class="chip">Challenge #<%= challengeNumber %></div>
## Information
## Statement
## Constraints
---
:::note
Start the project by running: `npx nx serve <%= appProjectName %>`.
:::
:::tip[Reminder]
Your PR title must start with <b>Answer:<%= challengeNumber %></b>.
:::
<div class="article-footer">
<a
href="https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A<%= challengeNumber %>+label%3Aanswer"
alt="<%= title %> community solutions">
❖ Community Answers
</a>
<a
href='https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A<%= challengeNumber %>+label%3A"answer+author"'
alt="<%= title %> solution author">
▶︎ Author Answer
</a>
</div>

View File

@@ -91,6 +91,7 @@ export async function challengeGenerator(tree: Tree, options: Schema) {
tmpl: '',
projectName: names(options.name).name,
appProjectName,
author: options.author,
title: options.title,
challengeNumber,
difficulty,

View File

@@ -1,5 +1,6 @@
export interface Schema {
title: string;
author: string;
challengeDifficulty: string;
docRepository: string;
name: string;

View File

@@ -17,7 +17,7 @@
"pattern": "^[a-zA-Z].*$"
},
"title": {
"description": "Title of your challenge. (use quote to add spaces)",
"description": "Title of your challenge.",
"type": "string",
"maxLength": "25",
"$default": {
@@ -26,6 +26,12 @@
},
"x-priority": "important"
},
"author": {
"description": "Your full name",
"type": "string",
"maxLength": "25",
"x-priority": "important"
},
"challengeDifficulty": {
"description": "The difficulty of the challenge.",
"type": "string",
@@ -114,5 +120,11 @@
}
},
"additionalProperties": false,
"required": ["name", "title", "challengeDifficulty", "docRepository"]
"required": [
"name",
"title",
"author",
"challengeDifficulty",
"docRepository"
]
}