Fix config dictionary build

This commit is contained in:
Pierre Burgy 2017-02-03 12:24:01 +01:00
parent 93e9bcf903
commit 872dfebc09
2 changed files with 6 additions and 5 deletions

View File

@ -103,16 +103,16 @@ module.exports = strapi => {
common: cb => {
dictionary.aggregate({
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.api, api, strapi.config.paths.config),
excludeDirs: /(locales|environments)$/,
filter: /(.+)\.(js|json)$/,
excludeDirs: /(validators)$/,
depth: 2
}, cb);
},
specific: cb => {
dictionary.aggregate({
dictionary.optional({
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.api, api, strapi.config.paths.config, 'environments', strapi.config.environment),
filter: /(.+)\.(js|json)$/,
depth: 2
depth: 1
}, cb);
}
}, (err, config) => {

View File

@ -94,15 +94,16 @@ module.exports = strapi => {
common: cb => {
dictionary.aggregate({
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins, plugin, strapi.config.paths.config),
excludeDirs: /(locales|environments)$/,
filter: /(.+)\.(js|json)$/,
depth: 2
}, cb);
},
specific: cb => {
dictionary.aggregate({
dictionary.optional({
dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins, plugin, strapi.config.paths.config, 'environments', strapi.config.environment),
filter: /(.+)\.(js|json)$/,
depth: 2
depth: 1
}, cb);
}
}, (err, config) => {