Ghost/core/frontend/services/themes/config/index.js
Nazar Gargol e10e71cc26 Added /frontend folder to default lint command
no issue

- The folder was overseen to be added to lint rules after it has been extracted out of /server
2019-08-08 10:47:13 +02:00

14 lines
422 B
JavaScript

var _ = require('lodash'),
defaultConfig = require('./defaults'),
allowedKeys = ['posts_per_page', 'image_sizes'];
module.exports.create = function configLoader(packageJson) {
var config = _.cloneDeep(defaultConfig);
if (packageJson && Object.prototype.hasOwnProperty.call(packageJson, 'config')) {
config = _.assign(config, _.pick(packageJson.config, allowedKeys));
}
return config;
};