Skip to content

Commit b72435c

Browse files
Yeoman generator support for optional --projectguid=... CLI argument
1 parent 7f841ff commit b72435c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

templates/package-builder/src/yeoman/app/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class MyGenerator extends yeoman.Base {
2828
prompting() {
2929
const done = this.async();
3030

31+
this.option('projectguid');
3132
this._optionOrPrompt([{
3233
type: 'list',
3334
name: 'framework',
@@ -41,7 +42,7 @@ class MyGenerator extends yeoman.Base {
4142
}], answers => {
4243
this._answers = answers;
4344
this._answers.namePascalCase = toPascalCase(answers.name);
44-
this._answers.projectGuid = uuid.v4();
45+
this._answers.projectGuid = this.options['projectguid'] || uuid.v4();
4546
done();
4647
});
4748
}

templates/package-builder/src/yeoman/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-aspnetcore-spa",
3-
"version": "0.2.7",
3+
"version": "0.2.8",
44
"description": "Single-Page App templates for ASP.NET Core",
55
"author": "Microsoft",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)