feat: support sharable configuration

Adds the options `extends`, which can be defined via configuration file or CLI arguments to a single path or an array of paths of shareable configuration.
A shareable configuration is a file or a module that can be loaded with `require`.
Options is defined by merging in the following order of priority:
- CLI/API
- Configuration file
- Shareable configuration (from right to left)

Options set in a shareable configuration can be unset by setting it to `null` or `undefined` in the main configuration file. If a default value applies to this property it will be used.
This commit is contained in:
Pierre Vanduynslager
2017-12-22 14:22:30 -05:00
parent 2fc538b607
commit 754b420fd6
14 changed files with 508 additions and 59 deletions
-4
View File
@@ -15,10 +15,6 @@ module.exports = async opts => {
const config = await getConfig(opts, logger);
const {plugins, options} = config;
if (!options.repositoryUrl) {
throw new SemanticReleaseError('The repositoryUrl option is required', 'ENOREPOURL');
}
logger.log('Run automated release from branch %s', options.branch);
if (!options.dryRun) {