mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 04:43:03 -05:00
fix(generator): update generator
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export interface Schema {
|
||||
title: string;
|
||||
author: string;
|
||||
challengeDifficulty: string;
|
||||
docRepository: string;
|
||||
name: string;
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user