From 52838b0a3a8129163939baaf33a8cf0bba4d30fa Mon Sep 17 00:00:00 2001 From: Compey Date: Sat, 19 Nov 2022 19:04:00 +0530 Subject: [PATCH] feat: ascii :) --- packages/cli/lib/constants.ts | 14 ++++++++++++++ packages/cli/lib/welcome.txt | 7 +++++++ packages/cli/src/index.ts | 5 +++++ 3 files changed, 26 insertions(+) create mode 100644 packages/cli/lib/constants.ts create mode 100644 packages/cli/lib/welcome.txt diff --git a/packages/cli/lib/constants.ts b/packages/cli/lib/constants.ts new file mode 100644 index 0000000..dee0eb1 --- /dev/null +++ b/packages/cli/lib/constants.ts @@ -0,0 +1,14 @@ +import * as fs from 'fs' +import * as path from 'path' +import { cwd } from 'process' +import * as http from 'http' + +export const c = { + // Welcome message is only accessable by files in src, + // else it throws an error. + welcomeMessage: `${http.get("https://raw.githubusercontent.com/CompeyDev/create-guilded-bot/main/packages/lib/welcome.txt")}` +} + +export default function getConstant(constant: string): string { + return c[constant] +} \ No newline at end of file diff --git a/packages/cli/lib/welcome.txt b/packages/cli/lib/welcome.txt new file mode 100644 index 0000000..37d1643 --- /dev/null +++ b/packages/cli/lib/welcome.txt @@ -0,0 +1,7 @@ + + ,--. ,--.,--. ,--. ,--. ,--. ,--. + ,---.,--.--. ,---. ,--,--.,-' '-. ,---. ,-----. ,---.,--.,--.`--'| | ,-| |,---. ,-| |,-----.| |-. ,---. ,-' '-. +| .--'| .--'| .-. :' ,-. |'-. .-'| .-. :'-----'| .-. | || |,--.| |' .-. | .-. :' .-. |'-----'| .-. '| .-. |'-. .-' +\ `--.| | \ --.\ '-' | | | \ --. ' '-' ' '' '| || |\ `-' \ --.\ `-' | | `-' |' '-' ' | | + `---'`--' `----' `--`--' `--' `----' .`- / `----' `--'`--' `---' `----' `---' `---' `---' `--' + `---' \ No newline at end of file diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts index 9a87626..464998f 100644 --- a/packages/cli/src/index.ts +++ b/packages/cli/src/index.ts @@ -3,6 +3,11 @@ import * as inquirer from "inquirer"; import getPackageManager from "../lib/getPackageManager"; import install from "../lib/installDependencies"; import * as logger from "../utils/logger" +import constants from "../lib/constants" +import getConstant from "../lib/constants"; + +const weclomeASCII = getConstant("welcomeMessage") +console.log(weclomeASCII) inquirer .prompt([