mirror of
https://github.com/LukeHagar/sveltekit-electron-adapter.git
synced 2025-12-06 12:47:49 +00:00
[Release] v0.2.0
This commit is contained in:
25
scripts/debug.ts
Normal file
25
scripts/debug.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Disable debug
|
||||
* =====================
|
||||
* Check if configs/config.js has debug to off
|
||||
*
|
||||
* @contributors: Patryk Rzucidło [@ptkdev] <support@ptkdev.io> (https://ptk.dev)
|
||||
*
|
||||
* @license: MIT License
|
||||
*
|
||||
*/
|
||||
import * as fs from "fs";
|
||||
import * as shell from "shelljs";
|
||||
import { argv } from "yargs";
|
||||
|
||||
declare const __dirname: string;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user