• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript safe.green函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: numeral

 server.listen(portNumber, () => {
     var endTime = Date.now();
     var elapsedTime = (endTime - startTime)/1000;
     var t = numeral(elapsedTime).format('0.00');
     console.log('\n');
     console.log(colors.bgGreen(colors.white('                                                         ')));
     console.log(colors.bgGreen(colors.white('           Startup completead in ' + t + ' seconds.           ')));
     console.log(colors.bgGreen(colors.white('                                                         ')));
     console.log('\n');
     console.log("Your application is in "+colors.green(server.get('env'))+" mode on port "+colors.green(portNumber));
     if (onReadyCallback) onReadyCallback();
 });
开发者ID:portalTS,项目名称:portalTS,代码行数:12,代码来源:app.ts


示例2: Date

 configurationsAPI.saveConfigruation('installed', {installation_time: new Date()}, (err) => {
     if (err) {
         console.error(colors.red("Ops! Something goes wrong! Please, try again!"));
         console.dir(err);
         return;
     }
     var table = new Table({
         head: [colors.green('\n  Installation completed!  \n')],
         chars: tableBorders
     });
     console.log(table.toString());
 });
开发者ID:portalTS,项目名称:portalTS,代码行数:12,代码来源:index.ts


示例3: Date

const downloadWallet = (wallet: SimpleWallet) => {
	console.log(white(`\n\nDownloading wallet for your convenience.\n\nPlease store someplace safe. The private key is encrypted by your password.\n\nTo load this wallet on a new computer you would simply import the .wlt file into this app and enter your password and you'll be able to sign transactions.
	`));

	if (!fs.existsSync(PATH_HOME)) {
		fs.mkdirSync(PATH_HOME);
	}

	let fullPath = PATH_WALLET;
	if (fs.existsSync(fullPath)) {
		const stamp = new Date().toISOString();
		fullPath = `${PATH_HOME}/${stamp}-${MOSAIC_NAME}-wallet.wlt`
	}
	fs.writeFileSync(fullPath, wallet.writeWLTFile());

	console.log(green(`Downloaded wallet to ${fullPath}`))
};
开发者ID:devslopes,项目名称:mosaic-cli-wallet,代码行数:17,代码来源:wallet-cli.ts


示例4: async

	}, async (_, result) => {
		if (result.password !== result.confirmPass) {
			console.log(magenta('\nPasswords do not match.\n\n'));
			createPwd();
		} else {
			/**
			 * Create new SimpleWallet
			 * Open it to access the new Account
			 * Print account info
			 */
			const wallet = createSimpleWallet(result.password);
			const pass = new Password(result.password);
			const account = wallet.open(pass);
			const address = account.address.pretty();
			console.log(green(`${MOSAIC_NAME} wallet successfully created.`));
			console.log(white(`You can now start sending and receiving ${MOSAIC_NAME}!`));
			console.log(white(`\n${MOSAIC_NAME} Public Address:`));
			console.log(yellow(`${address}`));
			console.log(white(`\nPrivate Key:`));
			console.log(yellow(`${account.privateKey}`));
			await downloadWallet(wallet);
		}
	})
开发者ID:devslopes,项目名称:mosaic-cli-wallet,代码行数:23,代码来源:wallet-cli.ts


示例5: passed

function passed (value, type) {
    count++;
    if (value) {
        successful++;
    } else {
        failed++;
    }

    if(type==='sync'){
        syncCount++;
        if (value) {
            syncSuccessful++;
        } else {
            syncFailed++;
        }
    }

    if(type==='async'){
        asyncCount++;
        if (value) {
            asyncSuccessful++;
        } else {
            asyncFailed++;
        }
    }

    if(type==='cmdLine'){
        cmdLineCount++;
        if (value) {
            cmdLineSuccessful++;
        } else {
            cmdLineFailed++;
        }
    }

    return value ? colors.green('Passed') : colors.yellow('!!!!FAILED!!!!');
}
开发者ID:gliviu,项目名称:dir-compare,代码行数:37,代码来源:runTests.ts


示例6: performConfiguration

function performConfiguration() {

    var u = parameters.getParameter('install-user',null);
    var p = parameters.getParameter('install-password',null);
    if (u && p && u !== true && p !== true) {
        return performInstall({
            username: u,
            password: p
        });
    }

    var table = new Table({
        head: [colors.green('\n  Welcome to PortalTS! Please, create a new admin user  \n')],
        chars: tableBorders
    });
    console.log(table.toString());

    askUserInfo((answers) => {
        performInstall(answers);
    });



}
开发者ID:portalTS,项目名称:portalTS,代码行数:24,代码来源:index.ts


示例7: execSync

}

// check if there are untracked changes
const gitStatus = execSync("git status", {cwd: rootDir, encoding: "utf8"});
if (/have diverged/.test(gitStatus)) {
	if (!argv.dry) fail(colors.red("Cannot continue, the local branch has diverged from the git repo!"));
	else console.log(colors.red("This is a dry run. The full run would fail due to a diverged branch\n"));
} else if (!/working tree clean/.test(gitStatus)) {
	if (!argv.dry) fail(colors.red("Cannot continue, the local branch has uncommited changes!"));
	else console.log(colors.red("This is a dry run. The full run would fail due to uncommited changes\n"));
} else if (/Your branch is behind/.test(gitStatus)) {
	if (!argv.dry) fail(colors.red("Cannot continue, the local branch is behind the remote changes!"));
	else console.log(colors.red("This is a dry run. The full run would fail due to the local branch being behind\n"));
} else if (/Your branch is up\-to\-date/.test(gitStatus) || /Your branch is ahead/.test(gitStatus)) {
	// all good
	console.log(colors.green("git status is good - I can continue..."));
}

const releaseTypes = ["major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease"];

const releaseType = argv._[0] || "patch";
let newVersion = releaseType;
const oldVersion = pack.version as string;
if (releaseTypes.indexOf(releaseType) > -1) {
	if (releaseType.startsWith("pre") && argv._.length >= 2) {
		// increment to pre-release with an additional prerelease string
		newVersion = semver.inc(oldVersion, releaseType, argv._[1]);
	} else {
		newVersion = semver.inc(oldVersion, releaseType);
	}
	console.log(`bumping version ${colors.blue(oldVersion)} to ${colors.gray(releaseType)} version ${colors.green(newVersion)}\n`);
开发者ID:AlCalzone,项目名称:shared-utils,代码行数:31,代码来源:release.ts


示例8:

 res.removedStaged.forEach(v => log.log(`    ${colors.green('removed:')}  ${v}`));
开发者ID:STALKER2010,项目名称:jerk,代码行数:1,代码来源:cli.ts



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript safe.italic函数代码示例发布时间:2022-05-25
下一篇:
TypeScript safe.gray函数代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap