mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
192ebb1739
refs #9178 - move tests as well
14 lines
384 B
JavaScript
14 lines
384 B
JavaScript
var _ = require('lodash'),
|
|
defaultConfig = require('./defaults'),
|
|
allowedKeys = ['posts_per_page'];
|
|
|
|
module.exports.create = function configLoader(packageJson) {
|
|
var config = _.cloneDeep(defaultConfig);
|
|
|
|
if (packageJson && packageJson.hasOwnProperty('config')) {
|
|
config = _.assign(config, _.pick(packageJson.config, allowedKeys));
|
|
}
|
|
|
|
return config;
|
|
};
|