Skip to content
This repository was archived by the owner on Jun 27, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions 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 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 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