mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-23 01:58:29 +00:00
Yeoman generator support for optional --projectguid=... CLI argument
This commit is contained in:
@@ -28,6 +28,7 @@ class MyGenerator extends yeoman.Base {
|
|||||||
prompting() {
|
prompting() {
|
||||||
const done = this.async();
|
const done = this.async();
|
||||||
|
|
||||||
|
this.option('projectguid');
|
||||||
this._optionOrPrompt([{
|
this._optionOrPrompt([{
|
||||||
type: 'list',
|
type: 'list',
|
||||||
name: 'framework',
|
name: 'framework',
|
||||||
@@ -41,7 +42,7 @@ class MyGenerator extends yeoman.Base {
|
|||||||
}], answers => {
|
}], answers => {
|
||||||
this._answers = answers;
|
this._answers = answers;
|
||||||
this._answers.namePascalCase = toPascalCase(answers.name);
|
this._answers.namePascalCase = toPascalCase(answers.name);
|
||||||
this._answers.projectGuid = uuid.v4();
|
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "generator-aspnetcore-spa",
|
"name": "generator-aspnetcore-spa",
|
||||||
"version": "0.2.7",
|
"version": "0.2.8",
|
||||||
"description": "Single-Page App templates for ASP.NET Core",
|
"description": "Single-Page App templates for ASP.NET Core",
|
||||||
"author": "Microsoft",
|
"author": "Microsoft",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user