Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
693 B
TypeScript
Raw Permalink 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";
2023-04-18 18:59:12 +01:00
import { rimraf } from "rimraf";
2022-01-10 12:57:33 +00:00
2026-03-30 17:17:36 +02:00
import type { DependencyInfo } from "./dep.ts";
import type HakEnv from "./hakEnv.ts";
2021-12-14 14:32:27 +00:00
export default async function clean(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
2023-04-06 12:41:38 +00:00
await rimraf(moduleInfo.moduleDotHakDir);
await rimraf(path.join(hakEnv.dotHakDir, "links", moduleInfo.name));
await rimraf(path.join(hakEnv.projectRoot, "node_modules", moduleInfo.name));
}