Skip to content

Commit

Permalink
Merge pull request #46 from pattern-lab/develop
Browse files Browse the repository at this point in the history
Extend version logging with core version. Fixes #42
  • Loading branch information
raphaelokon authored and bmuenzenmeyer committed Feb 23, 2018
1 parent 3fd02f3 commit 26d686e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/patternlab-node-cli/bin/cli-actions/version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';
module.exports = ({
version,
dependencies: {
'patternlab-node': coreVersion
}
}) => `${version} (PatternLab Node Core version: ${coreVersion})`;
3 changes: 2 additions & 1 deletion packages/patternlab-node-cli/bin/patternlab.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const cli = require('commander');
const build = require('./cli-actions/build');
const help = require('./cli-actions/help');
const version = require('./cli-actions/version');
const init = require('./cli-actions/init');
const exportPatterns = require('./cli-actions/export');
const serve = require('./cli-actions/serve');
Expand All @@ -26,7 +27,7 @@ const silenceLogs = () => {
* Hook up cli version, usage and options
*/
cli
.version(pkg.version, '-V, --version')
.version(version(pkg), '-V, --version')
.usage('<cmd> [options]')
.arguments('<cmd> [options]')
.option('-c, --config <path>', 'Specify config file. Default looks up the project dir', val => val.trim(), './patternlab-config.json')
Expand Down
2 changes: 1 addition & 1 deletion packages/patternlab-node-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "patternlab-node-cli",
"description": "Command-line interface (CLI) for the patternlab-node core.",
"version": "0.0.1-alpha.6",
"version": "0.0.1-alpha.7",
"bin": {
"patternlab": "bin/patternlab.js"
},
Expand Down

0 comments on commit 26d686e

Please sign in to comment.