當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript terminal.yellow方法代碼示例

本文整理匯總了TypeScript中@angular-devkit/core.terminal.yellow方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript terminal.yellow方法的具體用法?TypeScript terminal.yellow怎麽用?TypeScript terminal.yellow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@angular-devkit/core.terminal的用法示例。


在下文中一共展示了terminal.yellow方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: switch

  workflow.reporter.subscribe((event: DryRunEvent) => {
    nothingDone = false;

    switch (event.kind) {
      case 'error':
        error = true;

        const desc = event.description == 'alreadyExist' ? 'already exists' : 'does not exist';
        logger.warn(`ERROR! ${event.path} ${desc}.`);
        break;
      case 'update':
        loggingQueue.push(tags.oneLine`
        ${terminal.white('UPDATE')} ${event.path} (${event.content.length} bytes)
      `);
        break;
      case 'create':
        loggingQueue.push(tags.oneLine`
        ${terminal.green('CREATE')} ${event.path} (${event.content.length} bytes)
      `);
        break;
      case 'delete':
        loggingQueue.push(`${terminal.yellow('DELETE')} ${event.path}`);
        break;
      case 'rename':
        loggingQueue.push(`${terminal.blue('RENAME')} ${event.path} => ${event.to}`);
        break;
    }
  });
開發者ID:cexbrayat,項目名稱:angular-cli,代碼行數:28,代碼來源:schematics.ts

示例2: if

 .then((data: Array<boolean>) => {
   const [isYarnInstalled, isCNPMInstalled] = data;
   if (isYarnInstalled && isCNPMInstalled) {
     console.log(terminal.yellow('You can `ng config -g cli.packageManager yarn` '
       + 'or `ng config -g cli.packageManager cnpm`.'));
   } else if (isYarnInstalled) {
     console.log(terminal.yellow('You can `ng config -g cli.packageManager yarn`.'));
   } else if (isCNPMInstalled) {
     console.log(terminal.yellow('You can `ng config -g cli.packageManager cnpm`.'));
   } else  {
     if (packageManager !== 'default' && packageManager !== 'npm') {
       console.log(terminal.yellow(`Seems that ${packageManager} is not installed.`));
       console.log(terminal.yellow('You can `ng config -g cli.packageManager npm`.'));
     }
   }
 });
開發者ID:headinclouds,項目名稱:angular-cli,代碼行數:16,代碼來源:check-package-manager.ts

示例3: tap

      tap(result => {
        if (result.success) {
          parentLogger.info(terminal.green('SUCCESS'));
        } else {
          parentLogger.info(terminal.yellow('FAILURE'));
        }
        parentLogger.info('Result: ' + JSON.stringify({ ...result, info: undefined }, null, 4));

        parentLogger.info('\nLogs:');
        logs.forEach(l => parentLogger.next(l));
        logs.splice(0);
      }),
開發者ID:angular,項目名稱:angular-cli,代碼行數:12,代碼來源:architect.ts

示例4: _fromPackageJson

  let localVersion;
  let shouldWarn = false;

  try {
    localVersion = _fromPackageJson();
    shouldWarn = localVersion != null && globalVersion.compare(localVersion) > 0;
  } catch (e) {
    // eslint-disable-next-line no-console
    console.error(e);
    shouldWarn = true;
  }

  if (shouldWarn && isWarningEnabled('versionMismatch')) {
    const warning = terminal.yellow(tags.stripIndents`
    Your global Angular CLI version (${globalVersion}) is greater than your local
    version (${localVersion}). The local Angular CLI version is used.

    To disable this warning use "ng config -g cli.warnings.versionMismatch false".
    `);
    // Don't show warning colorised on `ng completion`
    if (process.argv[2] !== 'completion') {
        // eslint-disable-next-line no-console
      console.error(warning);
    } else {
        // eslint-disable-next-line no-console
      console.error(warning);
      process.exit(1);
    }
  }

  // No error implies a projectLocalCli, which will load whatever
  // version of ng-cli you have installed in a local package.json
開發者ID:baconwaffles,項目名稱:angular-cli,代碼行數:32,代碼來源:init.ts

示例5:

 .forEach(line => console.error(terminal.yellow('  ' + line)));
開發者ID:fmalcher,項目名稱:angular-cli,代碼行數:1,代碼來源:process.ts

示例6:

 warn: s => terminal.bold(terminal.yellow(s)),
開發者ID:angular,項目名稱:angular-cli,代碼行數:1,代碼來源:index.ts


注:本文中的@angular-devkit/core.terminal.yellow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。