-
Notifications
You must be signed in to change notification settings - Fork 66
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
[BD-46] feat: help command for Paragon CLI #2603
[BD-46] feat: help command for Paragon CLI #2603
Conversation
Thanks for the pull request, @monteri! When this pull request is ready, tag your edX technical lead. |
✅ Deploy Preview for paragon-openedx ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
lib/install-theme.js
Outdated
if (process.argv.length === 4) { | ||
const providedTheme = process.argv[3]; | ||
installTheme(providedTheme); |
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.
I decided to add it in this PR since it is small and I could use newly created help
command functionality to describe it straight away.
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #2603 +/- ##
==========================================
+ Coverage 91.69% 91.81% +0.12%
==========================================
Files 235 235
Lines 4214 4217 +3
Branches 1021 1020 -1
==========================================
+ Hits 3864 3872 +8
+ Misses 346 341 -5
Partials 4 4
☔ View full report in Codecov by Sentry. |
bin/paragon-scripts.js
Outdated
// ... | ||
// ], | ||
// ********** Block for help command end ********** | ||
// }, |
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.
Does it make sense to use the syntax to describe JSDocs?
bin/paragon-scripts.js
Outdated
@@ -1,26 +1,68 @@ | |||
#!/usr/bin/env node | |||
/* eslint-disable no-console */ |
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.
You turned off the linter for the entire page, even though you're only using console.log
in one place. Should I turn off the linter rule only in one place?
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.
it is used twice there but I agree for two cases it is good idea.
bin/paragon-scripts.js
Outdated
return; | ||
} | ||
|
||
if (command === 'help') { |
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.
Is it necessary to move the word help
into a constant with a meaningful name?
lib/install-theme.js
Outdated
const answers = await promptUserForTheme(); | ||
installTheme(answers.theme); | ||
// Check if the user passed a theme parameter as a command-line argument | ||
if (process.argv.length === 4) { |
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.
Can we give a meaningful name for this expression? This way you can remove the redundant comment
*/ | ||
function padLeft(description, offsetString) { | ||
// Calculate the necessary padding based on the offsetString length | ||
const padding = ' '.repeat(Math.max(0, DESCRIPTION_PAD - offsetString.length)); |
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.
Can we give a meaningful name for this constant? This way you can remove the redundant comment
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.
I think it is descriptive right now. Meaningful variable name would be very long
@monteri 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
🎉 This PR is included in version 21.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 22.0.0-alpha.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
PR includes:
help
commandCOMMANDS
object with commented exampleREADME.md
paragon install-theme <theme>
that can receive<theme>
parameterMerge Checklist
example
app?wittjeff
andadamstankiewicz
as reviewers on this PR.Post-merge Checklist