-
Notifications
You must be signed in to change notification settings - Fork 64
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
Conversation
@@ -0,0 +1,3 @@ | |||
#!/usr/bin/env node | |||
|
|||
require('./cli'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alas hscms
to hs
packages/cms-cli/commands/auth.js
Outdated
@@ -39,7 +34,7 @@ const { | |||
} = require('../lib/prompts'); | |||
const { commaSeparatedValues } = require('../lib/text'); | |||
|
|||
const COMMAND_NAME = 'auth'; | |||
const COMMAND_NAME = 'auth <type>'; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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>'; |
There was a problem hiding this comment.
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
packages/cms-cli/commands/server.js
Outdated
@@ -1,69 +0,0 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
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
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? |
Resolves #319 |
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. |
There was a problem hiding this 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
No description provided.