Skip to content

Commit b638ad0

Browse files
committed
expose version as getter
@raphaelokon will this work for pattern-lab/patternlab-node-cli#42 ?
1 parent c98f9e0 commit b638ad0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/lib/patternlab.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ const patternlab_engine = function (config) {
197197
const paths = patternlab.config.paths;
198198

199199
function getVersion() {
200+
return patternlab.package.version;
201+
}
202+
203+
function logVersion() {
200204
console.log(patternlab.package.version);
201205
}
202206

@@ -641,6 +645,9 @@ const patternlab_engine = function (config) {
641645

642646
return {
643647
version: function () {
648+
return logVersion();
649+
},
650+
v: function () {
644651
return getVersion();
645652
},
646653
build: function (callback, deletePatternDir) {

0 commit comments

Comments
 (0)