1
0
mirror of https://github.com/TheGreyDiamond/Enlight.git synced 2026-04-01 07:10:23 +02:00
This commit is contained in:
TheGreyDiamond
2020-11-29 17:43:34 +01:00
parent 05ad177917
commit 015e0779a3
112 changed files with 18004 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
import path from 'path';
import { execSync } from 'child_process';
import fs from 'fs';
import { dependencies } from '../../app/package.json';
const nodeModulesPath = path.join(__dirname, '..', '..', 'app', 'node_modules');
if (
Object.keys(dependencies || {}).length > 0 &&
fs.existsSync(nodeModulesPath)
) {
const electronRebuildCmd =
'../node_modules/.bin/electron-rebuild --parallel --force --types prod,dev,optional --module-dir .';
const cmd =
process.platform === 'win32'
? electronRebuildCmd.replace(/\//g, '\\')
: electronRebuildCmd;
execSync(cmd, {
cwd: path.join(__dirname, '..', '..', 'app'),
stdio: 'inherit',
});
}