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


TypeScript whiteBright.bold方法代码示例

本文整理汇总了TypeScript中cli-color.whiteBright.bold方法的典型用法代码示例。如果您正苦于以下问题:TypeScript whiteBright.bold方法的具体用法?TypeScript whiteBright.bold怎么用?TypeScript whiteBright.bold使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cli-color.whiteBright的用法示例。


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

示例1: deploy

    deploy():Q.IPromise<IDeployResult> {
        let start           = new Date().getTime(),
            config          = this.serviceContainer.config,
            packageData:any = JSON.parse('' + fs.readFileSync(__dirname + '/../../package.json'));

        this.log.logAndKeepColors(
            color.yellow(
                "\n\n+----------------------------------------------------+" +
                "\n|      ") + color.xterm(200).bold('Mouflon - your deployment manager') + ' ' + ('        v' + packageData.version).substr(-10, 10) + color.yellow("  |" +
                "\n+----------------------------------------------------+") +
            "\n\n");

        this.log.startSection(`Deploying "${config.projectName}" to "${config.stageName}"...`);
        this.log.debug('Timestamp is ' + color.whiteBright.bold(this.timestamp));
        if (config.verbose) {
            this.log.debug('Verbose mode is enabled');
        }
        this.log.debug('Working pathConfig: ' + config.pathConfig.getReadable());

        return this.deployManager.deploy().then(() => {
            let end = new Date().getTime();

            let result: IDeployResult = {
                project: config.projectName,
                stage: config.stageName,
                projectConfig: config.projectConfig,
                globalConfig: config.globalConfig,
                start: start,
                end: end,
            };
            return result;
        });
    }
开发者ID:stvnwrgs,项目名称:mouflon,代码行数:33,代码来源:Mouflon.ts

示例2: deploy

    deploy() {
        var start = (new Date()).getTime(),
            deployPromise: Q.IPromise<boolean>,
            config = this.serviceContainer.config,
            packageData: any = JSON.parse('' + fs.readFileSync(__dirname + '/../../package.json'));

        this.serviceContainer.log.logAndKeepColors(
            color.yellow(
                "\n\n+----------------------------------------------------+" +
                "\n|      ") + color.xterm(200).bold('Mouflon - your deployment manager') + ' ' + ('        v' + packageData.version).substr(-10, 10) + color.yellow("  |" +
            "\n+----------------------------------------------------+") +
            "\n\n");

        this.serviceContainer.log.startSection(sprintf('Deploying "%s" to "%s"...', config.projectName, config.stageName));
        this.serviceContainer.log.debug('Timestamp is ' + color.whiteBright.bold(this.timestamp));
        if (this.serviceContainer.config.verbose) {
            this.serviceContainer.log.debug('Verbose mode is enabled');
        }
        this.serviceContainer.log.debug('Working paths: ' + this.serviceContainer.config.paths.getReadable());

        deployPromise = this.deployManager.deploy();

        deployPromise.then(
            () => {
                var end = (new Date()).getTime();
                this.serviceContainer.log.closeSection(sprintf(
                    'It took %ss to deploy "%s" to "%s". :)' + "\n\n",
                    (0.001 * (end - start)).toFixed(3),
                    config.projectName,
                    config.stageName
                ));
            },
            (error) => {
                Utils.exitWithError(error);
            }
        );
    }
开发者ID:reasn,项目名称:mouflon,代码行数:37,代码来源:Mouflon.ts


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