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


TypeScript chalk.green类代码示例

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


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

示例1: log

export function log( type: 'title' | 'success' | 'error' | 'step' | 'substep' | 'default' = 'default', message: string = '' ): void {

	switch( type ) {

		case 'title':
			console.log( chalk.white.bold.underline( message ) );
			break;

		case 'success':
			console.log( chalk.green.bold( message ) );
			break;

		case 'error':
			console.log( chalk.red.bold( message ) );
			break;

		case 'step':
			console.log( chalk.white.bold( `  ${  message }` ) );
			break;

		case 'substep':
			console.log( chalk.gray( `    ${ arrowSymbol } ${  message }` ) );
			break;

		default:
			console.log( message );

	}

}
开发者ID:dominique-mueller,项目名称:automatic-release,代码行数:30,代码来源:log.ts

示例2: linkProjectExecutables

        if (project.isWorkspaceProject) {
          log.write(`Skipping workspace project: ${project.name}`);
          continue;
        }

        if (project.hasDependencies()) {
          await project.installDependencies({ extraArgs });
        }
      }
    }

    log.write(chalk.bold('\nInstalls completed, linking package executables:\n'));
    await linkProjectExecutables(projects, projectGraph);

    /**
     * At the end of the bootstrapping process we call all `kbn:bootstrap` scripts
     * in the list of projects. We do this because some projects need to be
     * transpiled before they can be used. Ideally we shouldn't do this unless we
     * have to, as it will slow down the bootstrapping process.
     */
    log.write(chalk.bold('\nLinking executables completed, running `kbn:bootstrap` scripts\n'));
    await parallelizeBatches(batchedProjects, async pkg => {
      if (pkg.hasScript('kbn:bootstrap')) {
        await pkg.runScriptStreaming('kbn:bootstrap');
      }
    });

    log.write(chalk.green.bold('\nBootstrapping completed!\n'));
  },
};
开发者ID:austec-automation,项目名称:kibana,代码行数:30,代码来源:bootstrap.ts

示例3: require

    require('postcss-import')(),
    require('postcss-cssnext')({
      browsers: ['> 1%', 'last 2 versions']
    }),
    require('postcss-reporter')({ clearMessages: true })
  ];
};;

export const PLUG_IN_PROGRESS = new ProgressBarPlugin({
  clear: true,
  width: 30,
  summary: false,
  incomplete: '😬 ',
  complete: '😜 ',
  customSummary: () => { },
  format: '  [:bar] ' + chalk.green.bold(':percent'),
});

function fileLoaderFactory(
  test: RegExp,
  name: string,
  limit: number,
  mimeType: string = ''
): FileLoader {
  return {
    test: test,
    loader: 'url-loader',
    query: {
      name: name,
      limit: limit,
      mimeType: mimeType
开发者ID:ArtemGovorov,项目名称:reactjs-hackathon-kit,代码行数:31,代码来源:constants.ts

示例4: succ

	public succ(message: string): void { // 何かに成功した状況で使う
		this.log(chalk.blue.bold('INFO'), chalk.green.bold(message));
	}
开发者ID:ha-dai,项目名称:Misskey,代码行数:3,代码来源:logger.ts

示例5: main


//.........这里部分代码省略.........
        console.log(" browse      = ", crawler.browseCounter);
        console.log(" browseNext  = ", crawler.browseNextCounter);
        console.log(" transaction = ", crawler.transactionCounter);
        if (false) {
            // todo : treeify.asTree performance is *very* slow on large object, replace with better implementation
            // xx console.log(treeify.asTree(obj, true));
            treeify.asLines(obj, true, true, (line: string) => {
                console.log(line);
            });
        }
    }
    client.removeListener("receive_response", print_stat);

    // -----------------------------------------------------------------------------------------------------------------
    // enumerate all Condition Types exposed by the server
    // -----------------------------------------------------------------------------------------------------------------

    console.log("--------------------------------------------------------------- Enumerate all Condition Types exposed by the server");
    const conditionTree = await enumerateAllConditionTypes(the_session);
    console.log(treeify.asTree(conditionTree));
    console.log(" -----------------------------------------------------------------------------------------------------------------");

    // -----------------------------------------------------------------------------------------------------------------
    // enumerate all objects that have an Alarm & Condition instances
    // -----------------------------------------------------------------------------------------------------------------

    const alarms = await enumerateAllAlarmAndConditionInstances(the_session);

    console.log(" -------------------------------------------------------------- Alarms & Conditions ------------------------");
    for (const alarm of alarms) {
        console.log(
          "parent = ",
          chalk.cyan(w(alarm.parent.toString(), 30)),
          chalk.green.bold(w(alarm.typeDefinitionName, 30)),
          "alarmName = ",
          chalk.cyan(w(alarm.browseName.toString(), 30)),
          chalk.yellow(w(alarm.alarmNodeId.toString(), 40))
        );
    }
    console.log(" -----------------------------------------------------------------------------------------------------------------");

    // -----------------------------------------------------------------------------------------------------------------
    // Testing if server implements QueryFirst
    // -----------------------------------------------------------------------------------------------------------------
    try {
        console.log(" ----------------------------------------------------------  Testing QueryFirst");
        const queryFirstRequest: QueryFirstRequestOptions =  {
            view: {
                viewId: NodeId.nullNodeId
            },

            nodeTypes: [
                {
                    typeDefinitionNode: makeExpandedNodeId("i=58"),

                    includeSubTypes: true,

                    dataToReturn: [{

                        attributeId: AttributeIds.AccessLevel,
                        relativePath: undefined
                    }]
                }
            ]};

        const queryFirstResult = await the_session.queryFirst(queryFirstRequest);
开发者ID:node-opcua,项目名称:node-opcua,代码行数:67,代码来源:simple_client.ts

示例6: echoGreenInfo

	public echoGreenInfo(outputText: string) {
		console.log(chalk.green.bold("%s"), ">> " + outputText);
	}
开发者ID:duffman,项目名称:superbob,代码行数:3,代码来源:terminal.ts

示例7: linkProjectExecutables

          await project.installDependencies({ extraArgs });
        }
      }
    }

    console.log(
      chalk.bold('\nInstalls completed, linking package executables:\n')
    );
    await linkProjectExecutables(projects, projectGraph);

    /**
     * At the end of the bootstrapping process we call all `kbn:bootstrap` scripts
     * in the list of projects. We do this because some projects need to be
     * transpiled before they can be used. Ideally we shouldn't do this unless we
     * have to, as it will slow down the bootstrapping process.
     */
    console.log(
      chalk.bold(
        '\nLinking executables completed, running `kbn:bootstrap` scripts\n'
      )
    );
    await parallelizeBatches(batchedProjects, async pkg => {
      if (pkg.hasScript('kbn:bootstrap')) {
        await pkg.runScriptStreaming('kbn:bootstrap');
      }
    });

    console.log(chalk.green.bold('\nBootstrapping completed!\n'));
  },
};
开发者ID:cccnam5158,项目名称:kibana,代码行数:30,代码来源:bootstrap.ts

示例8: send_response

    /**
     * @method send_response
     * @async
     * @param msgType
     * @param response
     * @param message
     * @param callback
     */
    public send_response(
      msgType: string,
      response: Response,
      message: Message,
      callback?: ErrorCallback
    ): void {

        const request = message.request;
        const requestId = message.requestId;

        if (this.aborted) {
            debugLog("channel has been terminated , cannot send responses");
            return callback && callback(new Error("Aborted"));
        }

        // istanbul ignore next
        if (doDebug) {
            assert(response.schema);
            assert(request.schema);
            assert(requestId > 0);
            // verify that response for a given requestId is only sent once.
            if (!this.__verifId) {
                this.__verifId = {};
            }
            assert(!this.__verifId[requestId], " response for requestId has already been sent !! - Internal Error");
            this.__verifId[requestId] = requestId;
        }

        if (doPerfMonitoring) {
            // record tick : send response received.
            this._tick2 = get_clock_tick();
        }

        assert(this.securityToken);

        let options = {
            channelId: this.securityToken.channelId,
            chunkSize: this.transport.receiveBufferSize,
            requestId,
            tokenId: this.securityToken.tokenId
        };

        const securityOptions =
          msgType === "OPN" ? this._get_security_options_for_OPN() : this._get_security_options_for_MSG();
        options = _.extend(options, securityOptions);

        response.responseHeader.requestHandle = request.requestHeader.requestHandle;

        /* istanbul ignore next */
        if (0 && doDebug) {
            console.log(" options ", options);
            analyze_object_binary_encoding(response as any as BaseUAObject);
        }

        /* istanbul ignore next */
        if (doTraceMessages) {
            console.log(
              chalk.cyan.bold("xxxx   >>>> ---------------------------------------- "),
              chalk.green.bold(response.schema.name),
              requestId
            );
            console.log(response.toString());
            console.log(chalk.cyan.bold("xxxx   >>>> ----------------------------------------|\n"));
        }

        if (this._on_response) {
            this._on_response(msgType, response, message);
        }

        this._transactionsCount += 1;
        this.messageChunker.chunkSecureMessage(
          msgType,
          options as ChunkMessageOptions,
          response as any as BaseUAObject,
          (messageChunk: Buffer | null) => {
              return this._send_chunk(callback, messageChunk);
          });
    }
开发者ID:node-opcua,项目名称:node-opcua,代码行数:86,代码来源:server_secure_channel_layer.ts

示例9: function

export default async function(source: string, destination: string, replacements: Object): Promise<void> {
	console.info(chalk.green.bold(' create ') + destination);
	const str = await ejsRender(source, replacements);
	await writeRenderedFile(str, destination);
}
开发者ID:dojo,项目名称:cli,代码行数:5,代码来源:template.ts


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