Spaces:
Running
Running
File size: 372 Bytes
95f4e64 |
1 2 3 4 5 6 7 8 9 10 11 12 |
import { existsSync, mkdirSync } from "fs";
import { posix } from "path";
export function findBinDirectory() {
const nodeModules = posix.resolve("node_modules");
if (!existsSync(nodeModules))
return "";
const binDirectory = posix.join(nodeModules, ".bin");
if (!existsSync(binDirectory))
mkdirSync(binDirectory);
return binDirectory;
}
|