Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
ask about target kibana version in generator
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Nov 4, 2016
1 parent 356b6fd commit 15b39e8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ module.exports = generator.Base.extend({
}.bind(this));
},

promptingTargetKibanaVersion: function () {
var done = this.async();
this.prompt({
type: 'list',
name: 'kbnVersion',
message: 'Target Kibana Version',
choices: ['5.0.0', '5.1.0', '6.0.0']
}, function (answers) {
this.kbnVersion = answers.kbnVersion;
done();
}.bind(this));
},

promptingGenerateApp: function () {
if (!this.options.advanced) {
this.generateApp = !this.options.minimal;
Expand Down Expand Up @@ -93,6 +106,7 @@ module.exports = generator.Base.extend({
generateApi: this.generateApi,
generateApp: this.generateApp,
generateHack: this.generateHack,
kbnVersion: this.kbnVersion,
description: this.description,
title: _.startCase(this.appname),
camelCaseName: _.camelCase(this.appname)
Expand Down
2 changes: 1 addition & 1 deletion src/generators/app/templates/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "<%= name %>",
"version": "0.0.0",
"version": "<%= kbnVersion %>",
"description": "<%= description %>",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 15b39e8

Please sign in to comment.