当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript chalk.green函数代码示例

本文整理汇总了TypeScript中chalk.green函数的典型用法代码示例。如果您正苦于以下问题:TypeScript green函数的具体用法?TypeScript green怎么用?TypeScript green使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了green函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: exec

 exec('npm run lint', (err, stdout) => {
   ui.writeLine(stdout);
   if (err) {
     ui.writeLine(chalk.red('Lint errors found in the listed files.'));
   } else {
     ui.writeLine(chalk.green('All files pass linting.'));
   }
   resolve();
 });
开发者ID:DrMabuse23,项目名称:angular-cli,代码行数:9,代码来源:lint.ts

示例2: replace

 return replace(this.config).then(changedFiles => {
   if (changedFiles.length > 0) {
     console.log();
     console.log(chalk.green(changedFiles.length, 'file(s) were changed'));
     changedFiles.forEach(file => console.log(chalk.grey('-', file)));
   } else {
     console.log(chalk.yellow('No files were changed'));
   }
 });
开发者ID:empirefox,项目名称:tompeg4,代码行数:9,代码来源:runner.ts

示例3: reject

   (err: NodeJS.ErrnoException, _stdout: string, stderr: string) => {
   if (err) {
     ui.writeLine(stderr);
     ui.writeLine(chalk.red('Package install failed, see above.'));
     reject();
   } else {
     ui.writeLine(chalk.green(`Installed packages for tooling via ${packageManager}.`));
     resolve();
   }
 });
开发者ID:itslenny,项目名称:angular-cli,代码行数:10,代码来源:npm-install.ts

示例4: PartnerCenterAuth

  .then((token: string) => {
    // get the aad token
    aadToken = token;
    console.log(chalk.green('.. obtained AAD access token.'));

    // use aad token to request parter center token
    console.log(chalk.white('Obtaining Partner Center token..'));
    let pcAuth: PartnerCenterAuth = new PartnerCenterAuth();
    return pcAuth.login(aadToken);
  })
开发者ID:PartnerCenterSamples,项目名称:partnercenter-restapi-nodejs,代码行数:10,代码来源:index.ts

示例5: resolve

   .on('close', (code: number) => {
     if (code === 0) {
       ui.writeLine(chalk.green(`Installed packages for tooling via ${packageManager}.`));
       resolve();
     } else {
       const message = 'Package install failed, see above.';
       ui.writeLine(chalk.red(message));
       reject(message);
     }
 });
开发者ID:3L4CKD4RK,项目名称:angular-cli,代码行数:10,代码来源:npm-install.ts

示例6: setupCommand

export async function setupCommand() {
  await createConfiguration()
  console.log(
    chalk.green(
      `Created configuration file ${chalk.cyan(
        'text-run.yml'
      )} with default values`
    )
  )
}
开发者ID:Originate,项目名称:tutorial-runner,代码行数:10,代码来源:setup.ts

示例7: exec

 exec(`npm run e2e -- ${this.project.ngConfig.e2e.protractor.config}`, (err, stdout, stderr) => {
   ui.writeLine(stdout);
   if (err) {
     ui.writeLine(stderr);
     ui.writeLine(chalk.red('Some end-to-end tests failed, see above.'));
   } else {
     ui.writeLine(chalk.green('All end-to-end tests pass.'));
   }
   resolve();
 });
开发者ID:DevVersion,项目名称:angular-cli,代码行数:10,代码来源:e2e.ts

示例8: slug

 .then((story: IStory) => {
   const id = story.id;
   const storySlug = slug(story.name).toLowerCase();
   const gitCmd = `git checkout -b ${story.story_type}/ch${id}/${storySlug}`;
   console.info(Chalk.green(`Successfully created a story with id ${id}`));
   console.info("You can view your story at " + link(`https://app.clubhouse.io/story/${id}`));
   console.info("To start working on this story (copied to clipboard): " + Chalk.bold(gitCmd));
   writeSync(gitCmd);
   return story;
 })
开发者ID:tyrchen,项目名称:clubhouse-cli,代码行数:10,代码来源:index.ts

示例9: stop

 stop(msg: string = chalk.green(figures.tick) as any) {
   const task = this.task
   if (!task) {
     return
   }
   this.status = msg
   this._stop()
   task.active = false
   delete this.task
 }
开发者ID:dhruvcodeword,项目名称:prisma,代码行数:10,代码来源:ActionBase.ts

示例10: reject

 mongoose.connect(nconf.get("db"), (err) => {
     if (err) {
         console.error(chalk.red("MongoDB connection crushed!"));
         console.log(err);
         reject(err)
     } else {
         console.log(chalk.green("Connected to MongoDB..."));
         resolve()
     }
 });
开发者ID:cm0s,项目名称:mea2n,代码行数:10,代码来源:mongoose_conf.ts


注:本文中的chalk.green函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。