Skip to content

Commit 830be37

Browse files
feat: enhance welcome message and update package.json metadata
1 parent 31ea14b commit 830be37

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ import chalkAnimation from 'chalk-animation';
66
import figlet from "figlet";
77
import { createSpinner } from "nanospinner";
88
import util from "util";
9+
import { stdout } from "process";
910

1011
const sleep = (ms = 2000) => new Promise((r) => setTimeout(r, ms));
1112
const figletPromise = util.promisify(figlet);
1213

1314
async function welcome() {
15+
const data = await figletPromise('Aditya', { font: 'Standard' });
16+
const lines = data.split('\n');
17+
const width = stdout.columns;
18+
const centeredText = lines.map(line => line.padStart((width+line.length) / 2)).join('\n')
19+
console.log(gradient.retro.multiline(centeredText)+'\n');
20+
await sleep();
1421
const rainbowTitle = chalkAnimation.rainbow(
1522
"Welcome to my portfolio, Nice meeting you !!"
1623
);

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
"version": "1.0.2",
44
"main": "index.js",
55
"type": "module",
6+
"bin": {
7+
"adix" : "./index.js"
8+
},
69
"scripts": {
710
"test": "echo \"Error: no test specified\" && exit 1"
811
},
9-
"bin": "./index.js",
10-
"keywords": [],
11-
"author": "",
12+
"keywords": ["portfolio", "cli", "aditya", "projects"],
13+
"author": "Aditya Singh",
1214
"license": "ISC",
13-
"description": "",
15+
"description": "A CLI tool to showcase Aditya Singh's portfolio",
1416
"dependencies": {
1517
"chalk": "^5.4.1",
1618
"chalk-animation": "^2.0.3",

0 commit comments

Comments
 (0)