Gathering detailed insights and metrics for shell-artist
Gathering detailed insights and metrics for shell-artist
npm install shell-artist
Typescript
Module System
Node Version
NPM Version
62.5
Supply Chain
96
Quality
74.4
Maintenance
100
Vulnerability
99.6
License
Total Downloads
2,741
Last Day
3
Last Week
13
Last Month
73
Last Year
1,128
Minified
Minified + Gzipped
Latest Version
2.7.2
Package Id
shell-artist@2.7.2
Unpacked Size
15.72 kB
Size
4.99 kB
File Count
4
NPM Version
10.2.3
Node Version
20.10.0
Publised On
25 Mar 2024
Cumulative downloads
Total Downloads
Last day
-25%
3
Compared to previous day
Last week
0%
13
Compared to previous week
Last month
58.7%
73
Compared to previous month
Last year
-30.1%
1,128
Compared to previous year
ShellArtist is a package that provides a simplified logging API. It takes some of the best npm packages, ties them together and wraps them around to your favorite Web API i.e. console.
1# using npm 2npm i shell-artist 3 4# using yarn 5yarn add shell-artist 6 7# using pnpm 8pnpm add shell-artist
1import sa from 'shell-artist'; 2 3sa.log('Hello World');
Output
1Hello World
config
object1import sa from 'shell-artist'; 2 3sa.log(' MY CLI APP ', { 4 bgColor: 'bgGreenBright', // https://github.com/chalk/chalk/tree/main#background-colors, 5 color: 'white', // https://github.com/chalk/chalk/tree/main#colors 6 modifier: 'bold', // https://github.com/chalk/chalk/tree/main#modifiers 7 emoji: 'rocket', // https://github.com/muan/emojilib/blob/main/dist/emoji-en-US.json, 8 box: { 9 title: 'package update', 10 borderColor: 'green', 11 style: 'double', // https://github.com/sindresorhus/boxen/tree/main#borderstyle (default - 'single') 12 padding: 2, // default - 1 13 margin: 2, // default - 1 14 dimBorder: true, // default - false 15 textAlignment: 'center', // default - 'center' 16 titleAlignment: 'left', // default - 'center' 17 }, 18});
Output
1import sa from 'shell-artist'; 2 3sa.warn('CAUTION'); 4sa.error('FAILURE'); 5sa.info('INFO'); 6// with the config object 7sa.success(' SUCCESS ', { 8 box: { 9 title: 'success', 10 borderColor: 'green', 11 }, 12 modifier: 'bold', 13 emoji: 'rocket', 14});
Output
1import sa from 'shell-artist'; 2import { setTimeout as sleep } from 'node:timers/promises'; 3 4const spinner = sa.start('Installing dependencies...'); 5await sleep(3000); 6 7sa.stop(spinner, 'All set!'); 8// with the config object 9sa.stop(spinner, 'All set!', { 10 modifier: 'strikethrough', 11}); 12// with prebuilt log levels 13sa.stop( 14 spinner, 15 'Build ran successfully', 16 { 17 modifier: 'bold', 18 }, 19 'success', 20); // status = 'success' | 'error' | 'info' | 'warn' 21sa.stop(spinner, 'Something went wrong', undefined, 'error');
Output
1 All set! 2 All set! 3✔ Build ran successfully 4✖ Something went wrong 5 6(will be updated with gifs)
1import sa from 'shell-artist'; 2 3// with array of colors 4sa.applyGradient('This tool will help you write beautiful logs', [ 5 'red', 6 'blue', 7 'green', 8 'yellow', 9]); 10// with prebuilt gradient 11sa.applyGradient('This tool will help you write beautiful logs', 'rainbow'); // https://github.com/bokub/gradient-string#available-built-in-gradients
Output
1import sa from 'shell-artist'; 2 3sa.animate('ANIMATED HEADING', 'neon'); // https://github.com/bokub/chalk-animation#available-animations
Output
1import sa from 'shell-artist'; 2 3sa.createAscii('Sample ASCII TeXt', { 4 font: 'Ghost', // https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/figlet/index.d.ts (default - 'Standard') 5 horizontalLayout: 'full', // "default" | "full" | "fitted" | "controlled smushing" | "universal smushing" | undefined; 6 verticalLayout: 'fitted', // "default" | "full" | "fitted" | "controlled smushing" | "universal smushing" | undefined; 7 width: 80, 8 whitespaceBreak: true, 9});
Output
No vulnerabilities found.
No security vulnerabilities found.