Skip to content

Commit e1f1334

Browse files
committed
fix: override config file options via CLI args, close #304
1 parent c6f50d5 commit e1f1334

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cfg-resolve.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import mergeOptions from 'merge-options';
44

55
export default ({input, flags = {}}) => {
66
const explorer = cosmiconfigSync('posthtml');
7-
let {config, use, output, root, allInOutput} = flags;
7+
let {config, use, output, root = './', allInOutput} = flags;
88

99
if (config) {
1010
({config} = explorer.load(config));
@@ -18,10 +18,10 @@ export default ({input, flags = {}}) => {
1818
({config} = explorer.search());
1919
}
2020

21-
return mergeOptions({
21+
return mergeOptions(config || {}, {
2222
input,
2323
output,
2424
root,
2525
allInOutput
26-
}, config || {}, use || {});
26+
}, use || {});
2727
};

0 commit comments

Comments
 (0)