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 %>
|
title: <%= difficulty %> <%= title %>
|
||||||
description: Challenge <%= challengeNumber %> is about ...
|
description: Challenge <%= challengeNumber %> is about ...
|
||||||
|
author: <%= author %>
|
||||||
|
challengeNumber: <%= challengeNumber %>
|
||||||
|
command: <%= appProjectName %>
|
||||||
sidebar:
|
sidebar:
|
||||||
order: <%= order %>
|
order: <%= order %>
|
||||||
badge: New
|
badge: New
|
||||||
@@ -10,33 +13,9 @@ sidebar:
|
|||||||
WIP: The following documentation need to be written.
|
WIP: The following documentation need to be written.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
<div class="chip">Challenge #<%= challengeNumber %></div>
|
|
||||||
|
|
||||||
## Information
|
## Information
|
||||||
|
|
||||||
## Statement
|
## Statement
|
||||||
|
|
||||||
## Constraints
|
## 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: '',
|
tmpl: '',
|
||||||
projectName: names(options.name).name,
|
projectName: names(options.name).name,
|
||||||
appProjectName,
|
appProjectName,
|
||||||
|
author: options.author,
|
||||||
title: options.title,
|
title: options.title,
|
||||||
challengeNumber,
|
challengeNumber,
|
||||||
difficulty,
|
difficulty,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
export interface Schema {
|
export interface Schema {
|
||||||
title: string;
|
title: string;
|
||||||
|
author: string;
|
||||||
challengeDifficulty: string;
|
challengeDifficulty: string;
|
||||||
docRepository: string;
|
docRepository: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
"pattern": "^[a-zA-Z].*$"
|
"pattern": "^[a-zA-Z].*$"
|
||||||
},
|
},
|
||||||
"title": {
|
"title": {
|
||||||
"description": "Title of your challenge. (use quote to add spaces)",
|
"description": "Title of your challenge.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"maxLength": "25",
|
"maxLength": "25",
|
||||||
"$default": {
|
"$default": {
|
||||||
@@ -26,6 +26,12 @@
|
|||||||
},
|
},
|
||||||
"x-priority": "important"
|
"x-priority": "important"
|
||||||
},
|
},
|
||||||
|
"author": {
|
||||||
|
"description": "Your full name",
|
||||||
|
"type": "string",
|
||||||
|
"maxLength": "25",
|
||||||
|
"x-priority": "important"
|
||||||
|
},
|
||||||
"challengeDifficulty": {
|
"challengeDifficulty": {
|
||||||
"description": "The difficulty of the challenge.",
|
"description": "The difficulty of the challenge.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -114,5 +120,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
"required": ["name", "title", "challengeDifficulty", "docRepository"]
|
"required": [
|
||||||
|
"name",
|
||||||
|
"title",
|
||||||
|
"author",
|
||||||
|
"challengeDifficulty",
|
||||||
|
"docRepository"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user