Skip to content

Commit 315be5e

Browse files
committed
feat(config): add 'extends' configuration option
Give users the option to extend Options with a deep merge with the object inside the "extends" configuration option fix #145
1 parent c3f210c commit 315be5e

File tree

3 files changed

+9487
-39
lines changed

3 files changed

+9487
-39
lines changed

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
var engine = require('./engine');
44
var conventionalCommitTypes = require('conventional-commit-types');
55
var configLoader = require('commitizen').configLoader;
6+
var merge = require('lodash.merge');
7+
var chalk = require('chalk');
68

79
var config = configLoader.load() || {};
810
var options = {
@@ -28,6 +30,10 @@ var options = {
2830
100
2931
};
3032

33+
if (!!config.extends) {
34+
options = merge(options, config.extends);
35+
}
36+
3137
(function(options) {
3238
try {
3339
var commitlintLoad = require('@commitlint/load');

0 commit comments

Comments
 (0)