How to use the @storybook/node-logger.logger.debug function in @storybook/node-logger

To help you get started, we’ve selected a few @storybook/node-logger 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 storybookjs / storybook / lib / server / src / presets.ts View on Github external
): Promise => {
      const value = await acc;

      if (typeof preset === 'function') {
        const m = await preset();

        const result = applyPreset(m, value) as StorybookConfig;

        return result;
      }
      if (typeof preset === 'string') {
        const exists = await fs.pathExists(preset);
        const m: StorybookConfig | null = exists ? await import(preset) : null;

        if (exists && m) {
          logger.debug(`applying string-preset: "${preset}"`);

          const { presets: mpresets, ...rest } = m;
          const newValue = mpresets ? await applyPresets(mpresets, value) : value;
          return applyPreset(rest, newValue) as StorybookConfig;
        }
        logger.warn(`unloadable string-preset: "${preset}"`);

        return value;
      }

      return value;
    },
    Promise.resolve(base)
github storybookjs / storybook / lib / server / src / utils / merge.ts View on Github external
mergeWith({}, a, ...rest, (objValue: any, srcValue: any) => {
    if (Array.isArray(srcValue) && Array.isArray(objValue)) {
      srcValue.forEach(s => {
        const existing = objValue.find(o => o === s || isEqual(o, s));
        if (!existing) {
          objValue.push(s);
        }
      });

      return objValue;
    }
    if (Array.isArray(objValue)) {
      logger.debug('the types mismatch');
      return objValue;
    }
    return undefined;
  });
github storybookjs / storybook / lib / config / src / utils / mergeConfig.ts View on Github external
mergeWith({}, a, ...rest, (objValue: any, srcValue: any) => {
    if (Array.isArray(srcValue) && Array.isArray(objValue)) {
      srcValue.forEach(s => {
        const existing = objValue.find(o => o === s || isEqual(o, s));
        if (!existing) {
          objValue.push(s);
        }
      });

      return objValue;
    }
    if (Array.isArray(objValue)) {
      logger.debug('the types mismatch');
      return objValue;
    }
    return undefined;
  });