File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11'use strict' ;
22const patternlab = require ( '@pattern-lab/core' ) ;
3- const config = Object . assign ( patternlab . getDefaultConfig ( ) , {
4- logLevel : 'quiet' ,
5- } ) ;
63
7- module . exports = ( { version } ) =>
8- `${ version } (PatternLab Node Core version: ${ patternlab ( config ) . version ( ) } )` ;
4+ module . exports = ( { version } ) => {
5+ `${ version } (PatternLab Node Core version: ${ patternlab . getVersion ( ) } )` ;
6+ } ;
Original file line number Diff line number Diff line change @@ -42,6 +42,15 @@ const getDefaultConfig = function() {
4242 return defaultConfig ;
4343} ;
4444
45+ /**
46+ * Returns current version
47+ *
48+ * @returns {string } current patternlab-node version as defined in `package.json`, as string
49+ */
50+ const getVersion = function ( ) {
51+ return packageInfo . version ;
52+ } ;
53+
4554const patternlab_module = function ( config ) {
4655 const PatternLabClass = require ( './lib/patternlab' ) ;
4756 const patternlab = new PatternLabClass ( config ) ;
@@ -222,5 +231,6 @@ const patternlab_module = function(config) {
222231} ;
223232
224233patternlab_module . getDefaultConfig = getDefaultConfig ;
234+ patternlab_module . getVersion = getVersion ;
225235
226236module . exports = patternlab_module ;
You can’t perform that action at this time.
0 commit comments