Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.

Commit 68706a9

Browse files
authored
Merge pull request #46 from pattern-lab/develop
Extend version logging with core version. Fixes #42
2 parents 529c3c1 + f3495d3 commit 68706a9

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

bin/cli-actions/version.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
module.exports = ({
3+
version,
4+
dependencies: {
5+
'patternlab-node': coreVersion
6+
}
7+
}) => `${version} (PatternLab Node Core version: ${coreVersion})`;

bin/patternlab.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const cli = require('commander');
44
const build = require('./cli-actions/build');
55
const help = require('./cli-actions/help');
6+
const version = require('./cli-actions/version');
67
const init = require('./cli-actions/init');
78
const exportPatterns = require('./cli-actions/export');
89
const serve = require('./cli-actions/serve');
@@ -26,7 +27,7 @@ const silenceLogs = () => {
2627
* Hook up cli version, usage and options
2728
*/
2829
cli
29-
.version(pkg.version, '-V, --version')
30+
.version(version(pkg), '-V, --version')
3031
.usage('<cmd> [options]')
3132
.arguments('<cmd> [options]')
3233
.option('-c, --config <path>', 'Specify config file. Default looks up the project dir', val => val.trim(), './patternlab-config.json')

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "patternlab-node-cli",
33
"description": "Command-line interface (CLI) for the patternlab-node core.",
4-
"version": "0.0.1-alpha.6",
4+
"version": "0.0.1-alpha.7",
55
"bin": {
66
"patternlab": "bin/patternlab.js"
77
},

0 commit comments

Comments
 (0)