Files
Patryk Rzucidlo (PTKDev) 7680437b1d [Fix] Scripts
2023-02-11 01:27:13 +01:00

22 lines
509 B
TypeScript

/**
* Check configs.js
* =====================
* Check if configs/config.js exist, if don't exist rename .tpl
*
* @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 { dirname } from "path";
const __dirname = dirname;
const path = `${__dirname}/../app/configs/config.js`;
if (!fs.existsSync(path)) {
shell.cp("-Rf", `${__dirname}/../app/configs/config.js.tpl`, path);
}