Skip to content
Snippets Groups Projects
Commit 040e0d3d authored by timothycarambat's avatar timothycarambat
Browse files

remove chalk dep for cloudformation document generator

parent 668a49c8
No related branches found
No related tags found
No related merge requests found
......@@ -12,13 +12,27 @@ import fs from 'fs';
import { fileURLToPath } from 'url';
import path, { dirname } from 'path';
import { exit } from 'process';
import chalk from 'chalk';
const __dirname = dirname(fileURLToPath(import.meta.url));
const REPLACEMENT_KEY = '!SUB::USER::CONTENT!'
const envPath = path.resolve(__dirname, `../../docker/.env`)
const envFileExists = fs.existsSync(envPath);
const chalk = {
redBright: function (text) {
return `\x1b[31m${text}\x1b[0m`
},
cyan: function (text) {
return `\x1b[36m${text}\x1b[0m`
},
greenBright: function (text) {
return `\x1b[32m${text}\x1b[0m`
},
blueBright: function (text) {
return `\x1b[34m${text}\x1b[0m`
}
}
if (!envFileExists) {
console.log(chalk.redBright('[ABORT]'), 'You do not have an .env file in your ./docker/ folder. You need to create it first.');
console.log('You can start by running', chalk.cyan('cp -n ./docker/.env.example ./docker/.env'))
......
......@@ -18,8 +18,5 @@
"prod:frontend": "cd frontend && yarn build",
"generate:cloudformation": "node aws/cloudformation/generate.mjs"
},
"private": false,
"devDependencies": {
"chalk": "^5.2.0"
}
"private": false
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment