MCPcopy Create free account
hub / github.com/code-forge-io/Remix-Forge / getPackageJson

Function getPackageJson

src/utils/vscode.ts:53–61  ·  view source on GitHub ↗
(rootDir: vscode.Uri)

Source from the content-addressed store, hash-verified

51};
52
53export async function getPackageJson(rootDir: vscode.Uri) {
54 const packageJsonPath = vscode.Uri.joinPath(vscode.Uri.file(rootDir.fsPath), "package.json").fsPath;
55 const packageJson = await vscode.workspace.fs.readFile(vscode.Uri.file(packageJsonPath));
56 let output = undefined;
57 try {
58 output = JSON.parse(packageJson.toString());
59 } catch (e) {}
60 return output;
61}
62
63export async function getDependencies(rootDir: vscode.Uri) {
64 const pkg = await getPackageJson(rootDir);

Callers 8

checkRemixVersionFunction · 0.90
generatePrismaFunction · 0.90
getProjectCommandsFunction · 0.90
getDependenciesFunction · 0.85
getDevDependenciesFunction · 0.85
installDependenciesFunction · 0.85
installDevDependenciesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected