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): pass a context when nuxt.config exports fn #6855

Merged
merged 2 commits into from
Jan 13, 2020

Conversation

pimlie
Copy link

@pimlie pimlie commented Jan 11, 2020

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Pass a context when nuxt.config exports a function. Context lists the command name (eg build, dev, start) and a dev boolean.

Note: using the term context might be confusing as this is ofc not the normal Nuxt context people are used to. Not sure how to call it differently though

Example usage:

// nuxt.config.js
export default ({ command, dev }) => {
  return {
    
  }
}

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@codecov-io
Copy link

codecov-io commented Jan 11, 2020

Codecov Report

Merging #6855 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev    #6855   +/-   ##
=======================================
  Coverage   64.76%   64.76%           
=======================================
  Files          78       78           
  Lines        2722     2722           
  Branches      708      708           
=======================================
  Hits         1763     1763           
  Misses        730      730           
  Partials      229      229
Flag Coverage Δ
#unit 64.76% <ø> (ø) ⬆️

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 154fd73...8651b6d. Read the comment docs.

@pimlie pimlie requested a review from a team January 11, 2020 12:05
@clarkdo clarkdo requested a review from pi0 January 11, 2020 19:33
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.

6 participants