How to use the kyt-utils/logger.log function in kyt-utils

To help you get started, weā€™ve selected a few kyt-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 nytimes / kyt / packages / kyt-core / utils / kytConfig.js View on Github external
serverURL: 'http://localhost:3000',
    clientURL: 'http://localhost:3001',
    prototypeURL: 'http://localhost:3002',
    hasServer: true,
    debug: false,
    reactHotLoader: false,
  };

  const kytConfigPath = optionalConfig
    ? path.join(userRootPath, optionalConfig)
    : userKytConfigPath;

  // Find user config
  if (shell.test('-f', kytConfigPath)) {
    try {
      logger.log('');
      logger.info(`Using kyt config at ${kytConfigPath}`);
      // eslint-disable-next-line global-require,import/no-dynamic-require
      config = require(kytConfigPath);
    } catch (error) {
      logger.error('Error loading your kyt.config.js:', error);
      process.exit();
    }
  }

  config = merge({}, baseConfig, config);

  if (typeof config.modifyWebpackConfig === 'function') {
    logger.info('What are you doing in your modifyWebpackConfig?');
    logger.info('Let us know: https://github.com/NYTimes/kyt/issues/432');
  }
github nytimes / kyt / packages / kyt-cli / cli / actions / setup.js View on Github external
module.exports = (flags, args) => {
  logger.start("Let's set up your new kyt project...");
  logger.log('āœØ  Answer a few questions to get started  āœØ \n');
  // Selects package manager to use
  let ypm;
  // Comment the following to see verbose shell ouput.
  shell.config.silent = true;
  let paths = {};
  const date = Date.now();
  let tmpStarter;
  // For passed starter-kyts the root of the starter-kyt is the root of the repo
  let tmpDir;
  let repoURL = 'https://github.com/NYTimes/kyt.git';
  let { localPath } = args;
  let tempPackageJSON;
  let oldPackageJSON;
  const fakePackageJson = {
    name: '',
    version: '1.0.0',
github nytimes / kyt / packages / kyt-cli / cli / actions / setup.js View on Github external
const bailProcess = error => {
    logger.error(`Failed to setup: ${repoURL}`);
    if (error) logger.log(error);
    removeTmpStarter();
    process.exit();
  };

kyt-utils

A shared kyt utility library.

Apache-2.0
Latest version published 12 months ago

Package Health Score

75 / 100
Full package analysis

Similar packages