1 Star 0 Fork 0

KwooShung/ConsoleBadge

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
MIT

@kwooshung/console-badge

GitHub Release Date - Published_At GitHub last commit GitHub code size in bytes GitHub top language GitHub pull requests GitHub issues NPM Version Npm.js Downloads/Week Github CI/CD codecov Maintainability GitHub License Gitee Repo Github Stars

中文 | English

Why Develop It?

In open source programs, there are various badges, just like the badges shown above; I hope that such badges can also be displayed in the console to facilitate the display of current program information, such as version number, build time, build status, etc. and other information.

Why Use It?

  • Supports bilingual annotations in both Chinese and English;
  • Low learning cost, chain calling, simple and flexible use;
  • Implemented with modern features of ES6;
  • Written in TypeScript for type safety;
  • Pure script, can depend on any framework, any platform, any environment;
  • Supports on-demand import, esm modularization, natively supports tree-shaking, no worries about the size after packaging;
  • Of course, this project also provides a commonjs standard cjs version;
  • Test coverage of 100%.

Install

npm

npm install @kwooshung/console-badge

yarn

yarn add @kwooshung/console-badge

pnpm

pnpm add @kwooshung/console-badge

Usage

Basic Usage:

import ConsoleBadge from '@kwooshung/console-badge';

const cb = new ConsoleBadge('version', 'v1.2.3');
cb.[various configuration functions, supporting chain calls].print();

Demo Screenshot

Below is a demonstration of some of the functions;

ConsoleBadge Demo Screenshot

Why are the functions not listed here?

  • Initially, I thought of listing them, but considering the simplicity of use and straightforward code, it's better to view the source code directly Click here to view the source code.
  • The function names are quite intuitive, so there's no need to worry about understanding them.
  • If you're using TypeScript, you'll get prompts, and the comments are in both Chinese and English, making it very simple to use. There's nothing to worry about.
MIT License Copyright (c) 2024 KwooShung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

在开源程序中,存在各种各样的徽章,就上面所展示的徽章一样;我希望在控制台中也能显示这样的徽章,方便展示当前程序的信息,比如版本号、构建时间、构建状态等等信息。 expand collapse
JavaScript and 3 more languages
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kwooshung/ConsoleBadge.git
git@gitee.com:kwooshung/ConsoleBadge.git
kwooshung
ConsoleBadge
ConsoleBadge
main

Search