Skip to content

Commit 18f25f4

Browse files
committed
fix build, keeping the original test support
1 parent 9ab0524 commit 18f25f4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/utils/config.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,16 @@ function readConfig() {
5454

5555
if (configFilepath) {
5656
customConfig = require(configFilepath);
57+
options = _.merge({}, options, customConfig);
58+
options.rootDir = path.resolve(path.dirname(configFilepath), options.rootDir);
59+
} else {
60+
options._rootDir = config.rootDir;
61+
options.rootDir = path.join(pathToSourceJSUser, options.rootDir);
62+
63+
options._styleguideDir = config.styleguideDir;
64+
options.styleguideDir = path.join(pathToSourceJSUser, options.styleguideDir);
5765
}
5866

59-
options = _.merge({}, options, customConfig);
60-
61-
// Extend config
62-
options._rootDir = config.rootDir;
63-
options.rootDir = path.join(pathToSourceJSUser, config.rootDir);
64-
65-
options._styleguideDir = config.styleguideDir;
66-
options.styleguideDir = path.join(pathToSourceJSUser, config.styleguideDir);
67-
6867
validateConfig(options);
6968

7069
if (options.verbose) {

0 commit comments

Comments
 (0)