mirror of
https://github.com/ragestudio/relic.git
synced 2025-06-09 10:34:18 +00:00
35 lines
837 B
JavaScript
35 lines
837 B
JavaScript
const path = require("path")
|
|
const child_process = require("child_process")
|
|
|
|
const packagesPath = path.resolve(__dirname, "..", "packages")
|
|
|
|
const linkRoot = path.resolve(packagesPath, "core")
|
|
|
|
const linkPackages = [
|
|
path.resolve(packagesPath, "cli"),
|
|
path.resolve(packagesPath, "gui"),
|
|
]
|
|
|
|
async function main() {
|
|
console.log(`Linking @core to other packages...`)
|
|
|
|
const rootPkg = require(path.resolve(linkRoot, "package.json"))
|
|
|
|
await child_process.execSync("yarn link", {
|
|
cwd: linkRoot,
|
|
stdio: "inherit",
|
|
stdout: "inherit",
|
|
})
|
|
|
|
for (const linkPackage of linkPackages) {
|
|
await child_process.execSync(`yarn link "${rootPkg.name}"`, {
|
|
cwd: linkPackage,
|
|
stdio: "inherit",
|
|
stdout: "inherit",
|
|
})
|
|
}
|
|
|
|
console.log(`Done!`)
|
|
}
|
|
|
|
main() |