Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of commander, alias hscms over to hs, clean up code #320

Merged
merged 6 commits into from
Oct 5, 2020

Conversation

drewjenkins
Copy link
Contributor

No description provided.

@@ -0,0 +1,3 @@
#!/usr/bin/env node

require('./cli');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alas hscms to hs

@@ -39,7 +34,7 @@ const {
} = require('../lib/prompts');
const { commaSeparatedValues } = require('../lib/text');

const COMMAND_NAME = 'auth';
const COMMAND_NAME = 'auth <type>';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and throughout I cleaned up and normalized all of these. Removed the demand option where relevant and instead put it here in the command name. SHould be consistent throughout now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I have this as instead of [type] since it has a default... not sure if that is technically correct or not but it seems to work well

let logsResp;
const portalId = getPortalId(options);

trackCommandUsage(COMMAND_NAME, { latest, file }, portalId);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed file because it wasn't actually being captured or used


const COMMAND_NAME = 'remove';
const DESCRIPTION = 'Delete a file or folder from HubSpot';
exports.command = 'remove <path>';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't marked as required anywhere but it actually should be

@@ -1,69 +0,0 @@
#!/usr/bin/env node
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this file completely. Are there any concerns over this command? I think technically it would already be broken if being used since we swapped hs to yargs

@drewjenkins
Copy link
Contributor Author

Deleted all the commander commands, removed it from package.json, and removed all configuration for commander. Any spots you can think of that I may bemissing off the top of your head?

@drewjenkins
Copy link
Contributor Author

Resolves #319

@gcorne
Copy link
Contributor

gcorne commented Oct 2, 2020

Didn't run through the changes to see how much is left to do, but I think it would be great if we can get this in pretty soon since we released 2.1.0.

@drewjenkins drewjenkins marked this pull request as ready for review October 2, 2020 19:14
packages/cms-cli/commands/auth.js Show resolved Hide resolved
packages/cms-cli/commands/auth.js Outdated Show resolved Hide resolved
packages/cms-cli/commands/init.js Show resolved Hide resolved
packages/cms-cli/commands/logs.js Outdated Show resolved Hide resolved
Copy link
Contributor

@anthmatic anthmatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from @miketalley's comments, this LGTM

@drewjenkins drewjenkins merged commit 8d01d8c into master Oct 5, 2020
@drewjenkins drewjenkins deleted the issue/319 branch October 5, 2020 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants