From c8e1594ee928c92ec258acfdebf882e254259b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Che=C5=82miniak?= Date: Mon, 14 Oct 2024 19:06:26 +0200 Subject: [PATCH] feat: appearance change --- packages/cli/index.ts | 10 +++++++++- packages/cli/package.json | 1 + pnpm-lock.yaml | 30 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/packages/cli/index.ts b/packages/cli/index.ts index ea3f0f4..8a8a1b1 100644 --- a/packages/cli/index.ts +++ b/packages/cli/index.ts @@ -2,6 +2,8 @@ import { Command } from 'commander'; import inquirer from 'inquirer'; import chalk from 'chalk'; +import gradient from 'gradient-string'; + import { createProject } from '@create-stapler-app/core'; const asciiArt = ` @@ -17,7 +19,13 @@ const asciiArt = ` `; function displayHeader() { - console.log(chalk.hex('#3100F5').bold(asciiArt)); + const metalGradient = gradient([ + { color: '#4F4F4F', pos: 0 }, + { color: '#B0B0B0', pos: 0.5 }, + { color: '#4F4F4F', pos: 1 }, + ]); + + console.log(metalGradient(asciiArt)); console.log(chalk.bold('\n🖇️ Welcome to Stapler!\n')); } diff --git a/packages/cli/package.json b/packages/cli/package.json index 8d1e7c3..eafe957 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -14,6 +14,7 @@ "@create-stapler-app/core": "workspace:*", "chalk": "^5.3.0", "commander": "^12.1.0", + "gradient-string": "^3.0.0", "inquirer": "^10.2.2" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8116d70..2b040bc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -99,6 +99,9 @@ importers: commander: specifier: ^12.1.0 version: 12.1.0 + gradient-string: + specifier: ^3.0.0 + version: 3.0.0 inquirer: specifier: ^10.2.2 version: 10.2.2 @@ -554,6 +557,9 @@ packages: '@types/through@0.0.33': resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==} + '@types/tinycolor2@1.4.6': + resolution: {integrity: sha512-iEN8J0BoMnsWBqjVbWH/c0G0Hh7O21lpR2/+PrvAVgWdzL7eexIFm4JN/Wn10PTcmNdtS6U67r499mlWMXOxNw==} + '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} @@ -1319,6 +1325,10 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gradient-string@3.0.0: + resolution: {integrity: sha512-frdKI4Qi8Ihp4C6wZNB565de/THpIaw3DjP5ku87M+N9rNSGmPTjfkq61SdRXB7eCaL8O1hkKDvf6CDMtOzIAg==} + engines: {node: '>=14'} + graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -2138,10 +2148,16 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tinycolor2@1.6.0: + resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==} + tinyglobby@0.2.6: resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} engines: {node: '>=12.0.0'} + tinygradient@1.1.5: + resolution: {integrity: sha512-8nIfc2vgQ4TeLnk2lFj4tRLvvJwEfQuabdsmvDdQPT0xlk9TaNtpGd6nNRxXoK6vQhN6RSzj+Cnp5tTQmpxmbw==} + tmp@0.0.33: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} @@ -2734,6 +2750,8 @@ snapshots: dependencies: '@types/node': 22.5.4 + '@types/tinycolor2@1.4.6': {} + '@types/wrap-ansi@3.0.0': {} '@typescript-eslint/eslint-plugin@7.2.0(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.6.2))(eslint@8.57.0)(typescript@5.6.2)': @@ -3784,6 +3802,11 @@ snapshots: graceful-fs@4.2.11: {} + gradient-string@3.0.0: + dependencies: + chalk: 5.3.0 + tinygradient: 1.1.5 + graphemer@1.4.0: {} has-bigints@1.0.2: {} @@ -4598,11 +4621,18 @@ snapshots: dependencies: any-promise: 1.3.0 + tinycolor2@1.6.0: {} + tinyglobby@0.2.6: dependencies: fdir: 6.3.0(picomatch@4.0.2) picomatch: 4.0.2 + tinygradient@1.1.5: + dependencies: + '@types/tinycolor2': 1.4.6 + tinycolor2: 1.6.0 + tmp@0.0.33: dependencies: os-tmpdir: 1.0.2