File tree Expand file tree Collapse file tree 4 files changed +13
-95
lines changed Expand file tree Collapse file tree 4 files changed +13
-95
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
const patternlab = require ( '@pattern-lab/core' ) ;
3
- const config = Object . assign ( patternlab . getDefaultConfig ( ) , {
4
- logLevel : 'quiet' ,
5
- } ) ;
6
3
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() {
42
42
return defaultConfig ;
43
43
} ;
44
44
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
+
45
54
const patternlab_module = function ( config ) {
46
55
const PatternLabClass = require ( './lib/patternlab' ) ;
47
56
const patternlab = new PatternLabClass ( config ) ;
@@ -222,5 +231,6 @@ const patternlab_module = function(config) {
222
231
} ;
223
232
224
233
patternlab_module . getDefaultConfig = getDefaultConfig ;
234
+ patternlab_module . getVersion = getVersion ;
225
235
226
236
module . exports = patternlab_module ;
You can’t perform that action at this time.
0 commit comments