diff --git a/meta.js b/meta.js index 4371faac45..f318f2b2be 100644 --- a/meta.js +++ b/meta.js @@ -6,10 +6,13 @@ const { runLintFix, printMessage, } = require('./utils') +const pkg = require('./package.json') + +const templateVersion = pkg.version module.exports = { helpers: { - if_or: function(v1, v2, options) { + if_or(v1, v2, options) { if (v1 || v2) { return options.fn(this) } @@ -17,6 +20,9 @@ module.exports = { return options.inverse(this) }, }, + template_version() { + return templateVersion + }, prompts: { name: { type: 'string', diff --git a/template/config/index.js b/template/config/index.js index f0d536bf82..9cb902fefe 100644 --- a/template/config/index.js +++ b/template/config/index.js @@ -1,5 +1,5 @@ 'use strict' -// Template version: 1.2.7 +// Template version: {{ template_version }} // see http://vuejs-templates.github.io/webpack for documentation. const path = require('path')