File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,10 @@ var path = require('canonical-path');
7
7
* Find the current version of the node module
8
8
*/
9
9
module . exports = function getVersion ( readFilesProcessor ) {
10
- var basePath = readFilesProcessor . basePath ;
10
+ var sourceFolder = path . resolve ( readFilesProcessor . basePath , 'node_modules' ) ;
11
+ var packageFile = 'package.json' ;
11
12
12
- return function ( component , sourceFolder , packageFile ) {
13
- sourceFolder = path . resolve ( basePath , sourceFolder || 'node_modules' ) ;
14
- packageFile = packageFile || 'package.json' ;
15
- return require ( path . join ( sourceFolder , component , packageFile ) ) . version ;
13
+ return function ( component ) {
14
+ return require ( path . join ( sourceFolder , component , packageFile ) ) . version ;
16
15
} ;
17
16
} ;
You can’t perform that action at this time.
0 commit comments