How to use the strapi-utils.dictionary.aggregate function in strapi-utils

To help you get started, we’ve selected a few strapi-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _api / index.js View on Github external
'validators/*': cb => {
            dictionary.aggregate({
              dirname: path.resolve(strapi.config.appPath, strapi.config.paths.api, api, strapi.config.paths.config, strapi.config.paths.validators),
              filter: /(.+)\.(json|js)$/,
              depth: 2
            }, cb);
          },
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _admin / index.js View on Github external
common: cb => {
              dictionary.aggregate({
                dirname: path.resolve(strapi.config.appPath, strapi.config.paths.admin, strapi.config.paths.config),
                excludeDirs: /(locales|environments|policies)$/,
                filter: /(.+)\.(js|json)$/,
                depth: 2
              }, cb);
            },
            specific: cb => {
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _config / index.js View on Github external
'config/*': cb => {
            dictionary.aggregate(
              {
                dirname: path.resolve(
                  strapi.config.appPath,
                  strapi.config.paths.config
                ),
                excludeDirs: /(locales|environments|policies)$/,
                filter: /(.+)\.(js|json)$/,
                depth: 2
              },
              cb
            );
          },
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _plugins / index.js View on Github external
'policies/*': cb => {
            dictionary.aggregate({
              dirname: path.resolve(strapi.config.appPath, strapi.config.paths.plugins, plugin, strapi.config.paths.policies),
              filter: /(.+)\.(js)$/,
              depth: 1
            }, cb);
          },