callista

1.0.18 • Public • Published

https://discord.gg/bbPmhMMSyC

Callista

Callista is the next generation of terminal tool kits for your use!

Why use 100's of packages when you can use Callista?

Why Callista?

Callista is just made for easy first-hand development, it reduces your projects weight be it big or small, Callista just makes things easy, with its in-built powerful library! Why it extends over others:

  1. Callista uses its own modules, bringing more rigidity in development.
  2. Makes the whole project light-weight.
  3. Offers you libraries for commercial software development.
  4. Provides flexibility instead of tough paradigms.

Libraries Provided

Beautify

The Beautify library innumerates modules that beautify the terminal, in other words, terminal styling.

Spinner

The spinner inside of the beautify library provides a animated spinner useful for showing loading ups! A pretty basic example

const {Beautify} = require("callista");

var spinner = new Beautify.spinner({
  text: "Something",
  color: "magenta"
}).go();
setTimeout(()=>{
  spinner.succeed();
}, 1000)

All Spinner Methods Part of the new Beautify.spinner class .start() -> Starts the initial spinner. Timeout interval is 300 by default. .succeed() -> Shows that the spinner succeeded, i.e., stops the spinner and indicates success with a tick mark. Takes in parameters(optional) as text .fail() -> Shows that the task indicated by the spinner failed, i.e., stops the spinner and indicates failure with a cross mark. Takes in parameters(optional) as text

Table

The Beautify library provides the freedom to make tables in your terminal!

A pretty basic example

var {Beautify, Logger} = require('callista');
const table = new Beautify.table("Tables");
table.setHeading("","Name","Gender").addRow('1','Micheal','Male').addRow('2',"Maria",'Female');
Logger.write(table.toString());

Alignments Beautify.table.toCentre() For centre alignment

Beautify.table.toRight() For right-ward alignment

Beautify.table.toLeft() For left-ward alignment

Table Methods setHeading() To set the heading of each Column addRow() To add a row.

Symbols

Pretty simple, the symbols library is used for introducing symbols into the terminal logging.

const {Beautify} = require('callista');
console.log(Beautify.symbol.info, Beautify.symbol.warning, Beautify.symbol.success, Beautify.symbol.error)

Methods in the symbols library: Info Error Warning Success

Color

This module provides of colors which can be used on terminal text.

A pretty basic example

var {Color} = require("callista");
console.log(Color.red("Hey I\'m red!"));
// Colored output, in console.

Colors provided by this module! red magenta blue black green blue grey white yellow brightRed brightGreen brightYellow brightBlue brightMagenta brightCyan brightWhite Use bg for colors but in background

Stlyes The Colors library also provides of different style functions! reset bold dim italic underline inverse hidden strikethrough

Random and Rainbow are also functions of this library!

Logging

This library provides of logging functions to log console outputs into a .log file or set levels for logs!

A pretty basic example

var {Logger} = require("callista");
Logger.level.warn("This is a console warning!"); // sends a warning to the console
Logger.write("I'm writing this to the default callista log file"); // writes this into callista.log and the terminal
// or use the simple log method
Logger.log("ok") // does not write into a log file!
Logger.write("I'm writting in my own lovely file!","awesomeness") // writes to awesomeness.log

Logger.level Functions trace(text) debug(text) info(text) warn(text) error(text)

You can set logger level using the level.setLevel() method or to set the default level -> level.setDefaultLevel() method The different Levels are...

  1. Silent(5)
  2. Warn(3)
  3. info(2)
  4. error(4)
  5. trace(0)
  6. debug(1) Numbers in bracket indicate the level!

Changelog

  1. Added a more diverse documentation - 1.0.7
  2. Added symbols library to Beautify - 1.0.11
  3. Added go method to start spinner. .start() method has been depricated. - 1.0.12
  4. Removed unecessary underlying packages. - 1.0.13

Package Sidebar

Install

npm i callista

Weekly Downloads

0

Version

1.0.18

License

ISC

Unpacked Size

75.2 kB

Total Files

27

Last publish

Collaborators

  • adoniswoah