本文整理汇总了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();
});
示例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'));
}
});
示例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();
}
});
示例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);
})
示例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);
}
});
示例6: setupCommand
export async function setupCommand() {
await createConfiguration()
console.log(
chalk.green(
`Created configuration file ${chalk.cyan(
'text-run.yml'
)} with default values`
)
)
}
示例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();
});
示例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;
})
示例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
}
示例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()
}
});