Skip to content

Commit

Permalink
Added code comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Stian-Schikora committed Nov 3, 2022
1 parent b8c15b1 commit 41efd68
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,19 @@ export class ShellCommand{
this.shellProcess = shellProcess;
}
}

/**
* Get the sfdx-project.json file from current project
* @returns
*/
// eslint-disable-next-line
export function SFDX_PROJECT_JSON(): string {
console.log('GETTING PROJECT JSON');
return getFile(workspacePath + '/sfdx-project.json') as string;
}
/**
* Check if the current project is a multi package project
* @returns
*/
// eslint-disable-next-line
export function IS_MULTI_PCKG_DIRECTORY(): boolean {
let projJson = JSON.parse(SFDX_PROJECT_JSON());
Expand Down Expand Up @@ -51,7 +58,12 @@ export function getDirectories(absPath: string) {
});
}

//Use this to handle chained promises and command handling.
/**
* Function to initiate terminal processes from vscode. input command to run and optional param to suppress output to the dxMate output channel
* @param cmd
* @param suppressOutput
* @returns ShellCommand
*/
export function execShell(cmd: string, suppressOutput = false) {
let process = cp.exec(cmd, {cwd: workspacePath}, (err, out) => {
if(err && err.signal !== 'SIGINT') {
Expand Down

0 comments on commit 41efd68

Please sign in to comment.