mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
feat: update create challenge and challenge generator
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"name": "<%= authorName %>"
|
||||
}
|
||||
@@ -81,6 +81,21 @@ export async function challengeGenerator(tree: Tree, options: Schema) {
|
||||
category: options.category,
|
||||
});
|
||||
|
||||
const authorFile = tree.read(
|
||||
`./docs/src/content/authors/${options.author}.json`,
|
||||
);
|
||||
if (!authorFile) {
|
||||
generateFiles(
|
||||
tree,
|
||||
join(__dirname, 'files', 'author'),
|
||||
`./docs/src/content/authors/`,
|
||||
{
|
||||
tmpl: '',
|
||||
authorName: options.author,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
generateFiles(
|
||||
tree,
|
||||
join(__dirname, 'files', 'docs'),
|
||||
|
||||
Reference in New Issue
Block a user