mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
intialize evite on post-install
This commit is contained in:
parent
b9972935b3
commit
fcb7f1cdf0
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "evite"]
|
||||
path = evite
|
||||
url = https://github.com/ragestudio/evite
|
@ -32,5 +32,6 @@
|
||||
"form-data": "^4.0.0",
|
||||
"pm2": "5.3.0"
|
||||
},
|
||||
"_web_app_path": "packages/app",
|
||||
"version": "0.57.5"
|
||||
}
|
@ -145,8 +145,7 @@
|
||||
"electron-log": "^4.4.8",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"express": "^4.17.1",
|
||||
"typescript": "^4.3.5",
|
||||
"vite": "3.2.5"
|
||||
"typescript": "^4.3.5"
|
||||
},
|
||||
"config": {
|
||||
"forge": {
|
||||
|
@ -1,13 +1,16 @@
|
||||
const fs = require("node:fs")
|
||||
const path = require("node:path")
|
||||
|
||||
const sharedRootPath = path.resolve(process.cwd(), "shared")
|
||||
const child_process = require("node:child_process")
|
||||
|
||||
const rootPath = process.cwd()
|
||||
|
||||
const sharedRootPath = path.resolve(rootPath, "shared")
|
||||
const packagesPath = path.resolve(rootPath, "packages")
|
||||
|
||||
const getPackages = require("./utils/getPackages")
|
||||
|
||||
const pkgjson = require("../package.json")
|
||||
|
||||
async function linkSharedResources(pkgJSON, packagePath) {
|
||||
if (typeof pkgJSON !== "object") {
|
||||
throw new Error("Package must be an object")
|
||||
@ -53,9 +56,39 @@ async function linkSharedResources(pkgJSON, packagePath) {
|
||||
}
|
||||
}
|
||||
|
||||
async function initializeEvite() {
|
||||
const appPath = path.resolve(rootPath, pkgjson._web_app_path)
|
||||
const evitePath = path.resolve(rootPath, "evite")
|
||||
|
||||
console.log("📦 Initializing Evite...")
|
||||
|
||||
console.log(`Intalling Evite dependencies...`)
|
||||
await child_process.execSync("yarn install", {
|
||||
cwd: evitePath,
|
||||
stdio: "inherit",
|
||||
})
|
||||
|
||||
console.log(`Linking Evite to app...`)
|
||||
await child_process.execSync("yarn link", {
|
||||
cwd: evitePath,
|
||||
stdio: "inherit",
|
||||
})
|
||||
|
||||
await child_process.execSync(`yarn link "evite"`, {
|
||||
cwd: appPath,
|
||||
stdio: "inherit",
|
||||
})
|
||||
|
||||
console.log(`✅ Evite dependencies installed`)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
async function main() {
|
||||
console.time("✅ post-install tooks:")
|
||||
|
||||
await initializeEvite()
|
||||
|
||||
// read dir with absolute paths
|
||||
let packages = await getPackages()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user