mirror of
https://github.com/LukeHagar/sveltekit-electron-adapter.git
synced 2025-12-06 04:21:32 +00:00
22 lines
509 B
TypeScript
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);
|
|
}
|