1
0
Fork 1
mirror of https://example.com synced 2024-11-23 03:16:40 +09:00
firefish/scripts/clean-npm.mjs

44 lines
1 KiB
JavaScript
Raw Normal View History

2023-11-06 10:30:00 +09:00
import fs from "node:fs";
import path, { join } from "node:path";
import { fileURLToPath } from "node:url";
import { execa } from "execa";
2021-11-13 13:01:22 +09:00
(async () => {
2023-11-06 10:30:00 +09:00
const __dirname = path.dirname(fileURLToPath(import.meta.url));
2023-06-24 13:22:44 +09:00
fs.rmSync(join(__dirname, "/../packages/backend/node_modules"), {
recursive: true,
force: true,
});
fs.rmSync(join(__dirname, "/../packages/backend/native-utils/node_modules"), {
recursive: true,
force: true,
});
fs.rmSync(join(__dirname, "/../packages/client/node_modules"), {
recursive: true,
force: true,
});
fs.rmSync(join(__dirname, "/../packages/sw/node_modules"), {
recursive: true,
force: true,
});
2023-07-03 07:18:30 +09:00
fs.rmSync(join(__dirname, "/../packages/firefish-js/node_modules"), {
2023-06-24 16:59:27 +09:00
recursive: true,
force: true,
});
fs.rmSync(join(__dirname, "/../packages/megalodon/node_modules"), {
recursive: true,
force: true,
});
2023-06-22 10:25:25 +09:00
2023-06-24 13:22:44 +09:00
fs.rmSync(join(__dirname, "/../node_modules"), {
recursive: true,
force: true,
});
2023-06-24 13:22:44 +09:00
execa("pnpm", ["store", "prune"], {
cwd: join(__dirname, "/../"),
stdio: "inherit",
});
2021-11-13 13:01:22 +09:00
})();