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",
|
"form-data": "^4.0.0",
|
||||||
"pm2": "5.3.0"
|
"pm2": "5.3.0"
|
||||||
},
|
},
|
||||||
|
"_web_app_path": "packages/app",
|
||||||
"version": "0.57.5"
|
"version": "0.57.5"
|
||||||
}
|
}
|
@ -145,8 +145,7 @@
|
|||||||
"electron-log": "^4.4.8",
|
"electron-log": "^4.4.8",
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
"electron-squirrel-startup": "^1.0.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"typescript": "^4.3.5",
|
"typescript": "^4.3.5"
|
||||||
"vite": "3.2.5"
|
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"forge": {
|
"forge": {
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
const fs = require("node:fs")
|
const fs = require("node:fs")
|
||||||
const path = require("node:path")
|
const path = require("node:path")
|
||||||
|
const child_process = require("node:child_process")
|
||||||
const sharedRootPath = path.resolve(process.cwd(), "shared")
|
|
||||||
|
|
||||||
const rootPath = process.cwd()
|
const rootPath = process.cwd()
|
||||||
|
|
||||||
|
const sharedRootPath = path.resolve(rootPath, "shared")
|
||||||
const packagesPath = path.resolve(rootPath, "packages")
|
const packagesPath = path.resolve(rootPath, "packages")
|
||||||
|
|
||||||
const getPackages = require("./utils/getPackages")
|
const getPackages = require("./utils/getPackages")
|
||||||
|
|
||||||
|
const pkgjson = require("../package.json")
|
||||||
|
|
||||||
async function linkSharedResources(pkgJSON, packagePath) {
|
async function linkSharedResources(pkgJSON, packagePath) {
|
||||||
if (typeof pkgJSON !== "object") {
|
if (typeof pkgJSON !== "object") {
|
||||||
throw new Error("Package must be an 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() {
|
async function main() {
|
||||||
console.time("✅ post-install tooks:")
|
console.time("✅ post-install tooks:")
|
||||||
|
|
||||||
|
await initializeEvite()
|
||||||
|
|
||||||
// read dir with absolute paths
|
// read dir with absolute paths
|
||||||
let packages = await getPackages()
|
let packages = await getPackages()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user