File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const root = require ( 'app-root-path' ) ;
4
4
const path = require ( 'path' ) ;
5
- const fs = require ( 'fs' ) ;
5
+ const fs = require ( 'fs' ) ;
6
+
7
+ const pkgPath = path . join ( root . path , 'package.json' ) ;
8
+ const { config} = require ( pkgPath ) ;
6
9
7
10
const CZ_CONFIG_NAME = '.cz-config.js' ;
11
+
8
12
let czConfigPath = path . join ( root . path , CZ_CONFIG_NAME ) ;
9
13
10
- const pkgPath = path . join ( root . path , 'package.json' ) ;
11
- const { config } = require ( pkgPath ) ;
12
14
if ( config && config [ 'cz-customizable' ] ) {
13
15
const file = config [ 'cz-customizable' ] . config ;
16
+
14
17
czConfigPath = path . join ( root . path , file ) ;
15
18
}
16
19
@@ -35,5 +38,5 @@ function get(path) {
35
38
return czConfig ;
36
39
}
37
40
38
- module . exports = ( ) => get ( czConfigPath ) ;
41
+ module . exports = ( ) => get ( czConfigPath ) ;
39
42
module . exports . get = get ;
You can’t perform that action at this time.
0 commit comments