Skip to content

Commit 3f232bf

Browse files
sudo-suhasLinusBorg
authored andcommitted
Load, render template version using helper (#1202)
1 parent cd4d7d9 commit 3f232bf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

meta.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ const {
66
runLintFix,
77
printMessage,
88
} = require('./utils')
9+
const pkg = require('./package.json')
10+
11+
const templateVersion = pkg.version
912

1013
module.exports = {
1114
helpers: {
12-
if_or: function(v1, v2, options) {
15+
if_or(v1, v2, options) {
1316
if (v1 || v2) {
1417
return options.fn(this)
1518
}
1619

1720
return options.inverse(this)
1821
},
1922
},
23+
template_version() {
24+
return templateVersion
25+
},
2026
prompts: {
2127
name: {
2228
type: 'string',

template/config/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict'
2-
// Template version: 1.2.7
2+
// Template version: {{ template_version }}
33
// see http://vuejs-templates.github.io/webpack for documentation.
44

55
const path = require('path')

0 commit comments

Comments
 (0)