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

feat(cli): improvements and external commands #4314

Merged
merged 120 commits into from Dec 20, 2018
Merged

feat(cli): improvements and external commands #4314

merged 120 commits into from Dec 20, 2018

Conversation

galvez
Copy link

@galvez galvez commented Nov 11, 2018

An attempt at implementing the universal approach from nuxt/rfcs#11

(edited by @pi0)

Main objectives

  • Alias nuxt-custom ... commands with nuxt custom ... shortcut. Allowing a universal way for pluggable nuxt module commands.
  • Expose NuxtCommand class (@nuxt/cli) for command authors

Other changes

  • Internal refactors and test improvements
  • Prevent process.exit as much as possible (Thanks to @pimlie tip)
  • Refactors on NuxtCommand for making it ready for external commands
    • This class could be finally moved into module-utils package
  • Refactors on built-in commands
  • -v alias for version

@galvez galvez added the WIP label Nov 11, 2018
@galvez galvez self-assigned this Nov 11, 2018
@codecov-io
Copy link

codecov-io commented Nov 12, 2018

Codecov Report

Merging #4314 into dev will decrease coverage by 0.49%.
The diff coverage is 62.5%.

Impacted file tree graph

@@            Coverage Diff            @@
##              dev    #4314     +/-   ##
=========================================
- Coverage   91.02%   90.53%   -0.5%     
=========================================
  Files          61       61             
  Lines        2196     2198      +2     
  Branches      527      529      +2     
=========================================
- Hits         1999     1990      -9     
- Misses        179      189     +10     
- Partials       18       19      +1
Impacted Files Coverage Δ
packages/cli/src/options/common.js 66.66% <ø> (ø) ⬆️
packages/cli/src/commands/help.js 0% <0%> (ø) ⬆️
packages/cli/src/list.js 0% <0%> (ø) ⬆️
packages/cli/src/commands/start.js 66.66% <100%> (ø) ⬆️
packages/cli/src/commands/dev.js 79.16% <100%> (ø) ⬆️
packages/cli/src/commands/build.js 83.33% <100%> (+1.51%) ⬆️
packages/cli/src/commands/generate.js 83.33% <100%> (+4.76%) ⬆️
packages/cli/src/commands/index.js 11.11% <11.11%> (-88.89%) ⬇️
packages/cli/src/run.js 33.33% <37.5%> (-25.5%) ⬇️
packages/cli/src/utils/index.js 57.81% <80%> (ø) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3fd059d...fb5821b. Read the comment docs.

@galvez galvez removed the WIP label Nov 12, 2018
@galvez galvez mentioned this pull request Nov 12, 2018
4 tasks
packages/cli/src/list.js Outdated Show resolved Hide resolved
packages/cli/src/local.js Outdated Show resolved Hide resolved
test/fixtures/with-commands/commands/my-custom-command.js Outdated Show resolved Hide resolved
@pi0 pi0 changed the title feat: module commands feat(cli): improvements and external commands Dec 19, 2018
Copy link
Author

@galvez galvez left a comment

Choose a reason for hiding this comment

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

Thanks @pi0 -- love the changes, LGreatTM :)

@pi0 pi0 merged commit 0145551 into dev Dec 20, 2018
@pi0 pi0 deleted the feat/custom-commands branch December 20, 2018 11:15
@danielroe danielroe added the 2.x label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants