Skip to content
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit 62b6761

Browse files
generator-aspnetcore-spa now displays its own version number on startup
1 parent 67c2cfd commit 62b6761

File tree

1 file changed

+2
-1
lines changed
  • templates/package-builder/src/yeoman/app

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import npmWhich = require('npm-which');
99
const yosay = require('yosay');
1010
const toPascalCase = require('to-pascal-case');
1111
const isWindows = /^win/.test(process.platform);
12+
const generatorPackageJson = require(path.resolve(__dirname, '../package.json'));
1213

1314
// Paths matching these regexes will only be included if the user wants tests
1415
const testSpecificPaths = [
@@ -48,7 +49,7 @@ class MyGenerator extends yeoman.Base {
4849
constructor(args: string | string[], options: any) {
4950
super(args, options);
5051
this._optionOrPrompt = optionOrPrompt;
51-
this.log(yosay('Welcome to the ASP.NET Core Single-Page App generator!'));
52+
this.log(yosay('Welcome to the ASP.NET Core Single-Page App generator!\n\nVersion: ' + generatorPackageJson.version));
5253

5354
if (isWindows) {
5455
assertNpmVersionIsAtLeast('3.0.0');

0 commit comments

Comments
 (0)