We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c7b7bb commit 1a04907Copy full SHA for 1a04907
lib/cz-config.js
@@ -2,15 +2,18 @@
2
3
const root = require('app-root-path');
4
const path = require('path');
5
-const fs = require('fs');
+const fs = require('fs');
6
+
7
+const pkgPath = path.join(root.path, 'package.json');
8
+const {config} = require(pkgPath);
9
10
const CZ_CONFIG_NAME = '.cz-config.js';
11
12
let czConfigPath = path.join(root.path, CZ_CONFIG_NAME);
13
-const pkgPath = path.join(root.path, 'package.json');
-const { config } = require(pkgPath);
14
if (config && config['cz-customizable']) {
15
const file = config['cz-customizable'].config;
16
17
czConfigPath = path.join(root.path, file);
18
}
19
@@ -35,5 +38,5 @@ function get(path) {
35
38
return czConfig;
36
39
37
40
-module.exports = () => get(czConfigPath);
41
+module.exports = () => get(czConfigPath);
42
module.exports.get = get;
0 commit comments