GithubHelp home page GithubHelp logo

thabinpk / presentio Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itzsharksv/presentio

0.0 0.0 0.0 92 KB

Present CLI Info In Style!

Home Page: https://npm.im/presentio

License: MIT License

Shell 0.63% JavaScript 5.84% TypeScript 93.53%

presentio's Introduction

Presentio

Present CLI Info in Style! (A CLI app helper)

CircleCI Codecov npm bundle size

Buy Me A Coffee


The Why?

Why use Presentio instead of console.log()?
-------------------------------------------
Simply put it, its way more:
  - Elegent
  - Colorful
  - Readable
  - & Minimal
Why create a whole library for this?
------------------------------------
Presentio is a tool that was originally created for the Hyper Cli;
The use of various libraries to just log some basic colored txt & a help msg was a bit too excessive.
Here aroused the idea to create a fully fletched yet lightwieght library.
& that's how this project was born.

Add as a Dependency

yarn add presentio
# or
npm install presentio

Usage/Examples

@example: Hyper-Cli

import Present from 'presentio';

Present({
  title: 'Hyper',
  tagline: 'by @Shorky',
  description: 'A CLI to bootstrap new projects!',
  version: '1.0',
  fg: 'black',   // default: black
  bg: 'green',   // default: green
  clear: true,   // default: true
}, helpMessage);

Presentio also includes a built-in fn to ease the process of creating a help message.

import Present, { helpTxt } from 'presentio';

const cliCmds = {
  commands: {
    prettify: 'add rainbows everywhere'
  },
  flags: {
    rainbow: {
      alais: 'r',
      description: 'girl-in-red?',
      default: false
    }
  }
}

Present({
  ... // same config as above
}, helpTxt(cliCmds));

Expected output from: $ hyper -h/--help

Hyper v1.0 by @Shorky
A CLI to bootstrap new projects!

Usage:
  $ hyper <commands> [options]

Commands:
  <!-- cmd: description -->
  prettify: add rainbows everywhere

Options:
  <!-- alias, flag: description -->
  -r, --rainbow: girl-in-red?
  -h, --help: Print CLI's helpTxt      <!-- Included by default -->
  -v, --version: Print CLI's version   <!-- Included by default -->

Available Clrs (for fg&bg)

<!-- Incase sensitive -->
- Black
- Red
- Green
- Yellow
- Blue
- Magenta
- Cyan
- White
<!-- We'll be adding more later -->

Project Tree (For contributors)

📦 <Presentio>
├─ __Tests__
│  └─ <!-- Same as @lib -->
├─ .circleci
│  └─ config.yml
├─ .github
│  ├─ ISSUE_TEMPLATE
│  │  ├─ BUG_REPORT.md
│  │  └─ FEATURE_REQUEST.md
│  ├─ workflows
│  │  ├─ CodeQL.yml
│  │  └─ Release.yml
│  ├─ CODEOWNERS
│  ├─ FUNDING.yml
│  └─ PULL_REQUEST_TEMPLATE.md
├─ .husky
│  └─ pre-commit
├─ Docs
│  ├─ CODE_OF_CONDUCT.md
│  ├─ CONTRIBUTING.md
│  └─ SECURITY.md
├─ Lib
│  ├─ @Types
│  │  ├─ Args.d.ts
│  │  ├─ Present.d.ts
│  │  └─ Usage.d.ts
│  ├─ Modules
│  │  ├─ Clear.ts
│  │  └─ Clrs.ts
│  ├─ Utils
│  │  ├─ ErrorHandler.ts
│  │  └─ Indent.ts
│  ├─ Args.ts
│  ├─ Present.ts
│  └─ Usage.ts
├─ .gitignore
├─ .prettierrc    <!-- Available within package.json -->
├─ .eslintrc      <!-- Available within package.json -->
├─ jest.config.ts
├─ rollup.config.js
├─ README.md
├─ package.json
├─ tsconfig.json
└─ LICENSE
Made With ♥ By @Shorky

License

#
# Copyright 2022 @SharkSV
# License Identifier: MIT
#

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.