Skip to content

Commit

Permalink
Merge pull request #13 from nomad-mystic/kpm-setup-commander
Browse files Browse the repository at this point in the history
kpm: Remove logs
  • Loading branch information
nomad-mystic authored Aug 15, 2023
2 parents 57ff22f + 07fb373 commit 10012f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nomadmystic/wordpress-scaffold-cli",
"version": "0.7.0",
"version": "0.7.1",
"description": "This project is created to speed up WordPress development",
"main": "index.js",
"type": "module",
Expand Down
8 changes: 1 addition & 7 deletions src/bin/commander-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ export default class CommanderCli {
const inputs: Command | undefined = program?.parse()
const options: object = program?.opts() ? program.opts() : {};

console.log(inputs)
console.log(options)

// Create Array for comparing inputs from the user
const cliOptions: string[] = Object.keys(CommanderOptions);
const userInputs: string[] = Object.keys(options);
Expand All @@ -47,10 +44,6 @@ export default class CommanderCli {
process.exit(1);
}

console.log(cliOptions);
console.log(userInputs);
console.log(cliOptions.includes(userInputs[0]));

if (options && typeof options !== 'undefined' && cliOptions.includes(userInputs[0])) {
await this.callCommand(userInputs[0]);
}
Expand Down Expand Up @@ -103,6 +96,7 @@ export default class CommanderCli {
const path: string = CommanderOptions[command].path as string;
const fullPath: string = `${packageRootDir}dist/${path}`;

// Bail early
if (!fs.existsSync(fullPath)) {
console.log('Path to command doesn\'t! Contact the maintainer');

Expand Down

0 comments on commit 10012f3

Please sign in to comment.