Files
element-web/scripts/hak/link.ts
T

24 lines
768 B
TypeScript
Raw Normal View History

/*
2024-09-06 17:56:18 +01:00
Copyright 2024 New Vector Ltd.
Copyright 2020 The Matrix.org Foundation C.I.C.
2025-01-17 11:44:49 +00:00
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-06 17:56:18 +01:00
Please see LICENSE files in the repository root for full details.
*/
2024-10-30 18:06:03 +00:00
import path from "node:path";
2022-01-10 12:57:33 +00:00
import type HakEnv from "./hakEnv.js";
import { type DependencyInfo } from "./dep.js";
2021-12-14 14:32:27 +00:00
export default async function link(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
const linkFolder = path.join(hakEnv.dotHakDir, "links");
await hakEnv.spawn("yarn", ["link", "--link-folder", linkFolder], {
2024-10-30 18:06:03 +00:00
cwd: moduleInfo.moduleOutDir,
});
await hakEnv.spawn("yarn", ["link", "--link-folder", linkFolder, moduleInfo.name], {
2024-10-30 18:06:03 +00:00
cwd: hakEnv.projectRoot,
});
2020-02-17 14:49:26 +00:00
}