How to use the strapi-utils.dictionary 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 / _admin / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the user plugins.
 */

module.exports = strapi => {
  return {

    /**
     * Initialize the hook
     */

    initialize: cb => {
      async.auto({
        // Expose the `name` of the plugin for the callback.
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _api / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the user APIs.
 */

module.exports = strapi => {
  return {

    /**
     * Initialize the hook
     */

    initialize: cb => {
      _.forEach(strapi.api, (definition, api) => {
        async.auto({
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _externalHooks / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the external hooks
 */

module.exports = strapi => {
  return {

    /**
     * Initialize the hook
     */

    initialize: cb => {
      async.auto({
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _plugins / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the user plugins.
 */

module.exports = strapi => {
  return {

    /**
     * Initialize the hook
     */

    initialize: cb => {
      _.forEach(strapi.plugins, (definition, plugin) => {
        async.auto({
github strapi / strapi / packages / strapi / lib / configuration / hooks / models / _hooks / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the external hooks
 */

module.exports = function (strapi) {
  const hook = {

    /**
     * Initialize the hook
     */

    // initialize: function (cb) {
    //   async.auto({
    //
github strapi / strapi / packages / strapi / lib / configuration / hooks / dictionary / _config / index.js View on Github external
'use strict';

/**
 * Module dependencies
 */

// Node.js core.
const path = require('path');

// Public node modules.
const _ = require('lodash');
const async = require('async');

// Strapi utilities.
const dictionary = require('strapi-utils').dictionary;

/**
 * Async module loader to create a
 * dictionary of the user config
 */

module.exports = strapi => {
  return {
    /**
     * Initialize the hook
     */

    initialize: cb => {
      async.auto(
        {
          // Load common settings from `./config/*.js|json`.