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([