mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-11-17 07:45:52 +01:00
16 lines
423 B
JavaScript
16 lines
423 B
JavaScript
|
|
import _ from 'lodash';
|
|
import path from 'path';
|
|
|
|
import {parseConfigFile} from '../../../../src/lib/utils';
|
|
|
|
/**
|
|
* Override the default.yaml configuration file with any new config provided.
|
|
*/
|
|
export default (options, url = 'default.yaml') => {
|
|
const locationFile = path.join(__dirname, `../config/yaml/${url}`);
|
|
const config = parseConfigFile(locationFile);
|
|
|
|
return _.assign({}, _.cloneDeep(config), options);
|
|
}
|