Skip to content

Commit

Permalink
Changed array to contain functions instead of instances
Browse files Browse the repository at this point in the history
  • Loading branch information
lucsomers101 committed Feb 27, 2024
1 parent 24f3c3a commit 63fd813
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/commands/generatePrototypeCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class generatePrototypeCommand implements ICommand {
this.manifestFile = new manifest(context.extensionPath);
}

public async RunCommand()
async RunCommand()
{
this.tryKillPortForwardedProcessAndTerminal();

Expand Down
14 changes: 8 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { checkVersionCommand, generateAtlasCommand, generateFunctionalSpecComman
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {

let commands: Array<ICommand> = new Array<ICommand>();
let commands: Array<any> = new Array();
;
// Use the console to output diagnostic information (console.log) and errors (console.error).
// This line of code will only be executed once when your extension is activated.
console.info(
Expand All @@ -23,16 +24,17 @@ export function activate(context: vscode.ExtensionContext) {
watcherUtils.setupLastRunningWatcher(context);

commands.push(
new generatePrototypeCommand(context),
new generateAtlasCommand(),
new generateFunctionalSpecCommand(),
new checkVersionCommand()
() => new generatePrototypeCommand(context).RunCommand(),
() => new generateAtlasCommand().RunCommand(),
() => new generateFunctionalSpecCommand().RunCommand(),
() => new checkVersionCommand().RunCommand()
);

for (let index = 0; index < commands.length; index++) {
const command = commands[index];
pushDisposable(context, command.commandName, command.RunCommand());
pushDisposable(context, command.commandName, command);
}

generateWorkingFolders();
createAndFillGitIgnore();
}
Expand Down

0 comments on commit 63fd813

Please sign in to comment.