0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/test/unit/partials/config/index.js

16 lines
423 B
JavaScript
Raw Normal View History

import _ from 'lodash';
import path from 'path';
2019-09-26 11:22:14 -05:00
import {parseConfigFile} from '../../../../src/lib/utils';
2019-09-26 11:22:14 -05:00
/**
* 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);
2019-09-26 11:22:14 -05:00
return _.assign({}, _.cloneDeep(config), options);
}