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($core): better layout check #1455

Merged
merged 7 commits into from
Sep 7, 2019
Merged

feat($core): better layout check #1455

merged 7 commits into from
Sep 7, 2019

Conversation

shigma
Copy link
Collaborator

@shigma shigma commented Mar 16, 2019

Summary

  1. layoutComponentMap is generated by readdirSync so there is no need to check existence.
  2. If Layout.vue does not exist, Layout.path will always be undefined, which leads to a confusing warning.
  3. We don't expect a Layout.vue when a custom GlobalLayout is specified.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

@shigma shigma requested a review from ulivz March 16, 2019 15:57
@flozero
Copy link
Collaborator

flozero commented Sep 5, 2019

@shigma can you resolve the conflict please and it will be good for me

@flozero flozero added complexity: medium Medium complexity effort: low Around a day or less status: core team assigned Core team member assigned topic: theme Relates to VuePress theme type: enhancement Request to enhance an existing feature version: 1.x Relates to version 1 of VuePress labels Sep 5, 2019
@flozero
Copy link
Collaborator

flozero commented Sep 5, 2019

maybe update the docs about it

@flozero flozero merged commit 3b68913 into master Sep 7, 2019
@vue-bot
Copy link

vue-bot commented Sep 7, 2019

Hey @shigma, thank you for your time and effort spent on this PR, contributions like yours help make Vue better for everyone. Cheers! 💚

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium Medium complexity effort: low Around a day or less status: core team assigned Core team member assigned topic: theme Relates to VuePress theme type: enhancement Request to enhance an existing feature version: 1.x Relates to version 1 of VuePress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants