/** * Disable debug * ===================== * Check if configs/config.js has debug to off * * @contributors: Patryk Rzucidło [@ptkdev] (https://ptk.dev) * * @license: MIT License * */ import * as fs from "fs"; import * as shell from "shelljs"; import { argv } from "yargs"; import { dirname } from "path"; const __dirname = dirname; const path = `${__dirname}/../app/configs/config.js`; if (fs.existsSync(path)) { if (argv.enable) { shell.sed("-i", 'debug: "disabled"', 'debug: "enabled"', path); } else { shell.sed("-i", 'debug: "enabled"', 'debug: "disabled"', path); } }