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

Extends the support of absolute paths as theme dirs towards plugins #948

Closed
wants to merge 4 commits into from
Closed

Extends the support of absolute paths as theme dirs towards plugins #948

wants to merge 4 commits into from

Conversation

sebiniemann
Copy link

@sebiniemann sebiniemann commented Oct 21, 2018

Summary

As discussed in #942, the loadTheme documentation (@vuepress/core/lib/prepare/loadTheme.js) already mentions support of absolute path as a theme directory (even as top priority for resolving):

/**
 * Resolve theme.
 *
 *   Resolving Priority:
 *
 *   1. If the theme was a absolute path and that path exists, respect it
 *      as the theme directory.
 *   2. If 'theme' directory located at vuepressDir exists, respect it as
 *      the theme directory.
 *   3. If 'theme' was a shortcut string, resolve it from deps.

Support of this is also already working for layouts, global components and templates (these were especially tested by me and are working in a production environment for us).

However, support of the plugin api is missing as of now. This pull request adds support of this feature for absolute paths, getting all three options to include a theme in line again.

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

I am unsure if the source documentation can be seen as a statement of intended functional coverage in this case or not.

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

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

  • Yes
  • No

The PR fulfills these requirements:

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

@sebiniemann sebiniemann changed the title Extends the support of absolute paths as theme directories towards pl… Extends the support of absolute paths as theme dirs towards plugins Oct 21, 2018
@sebiniemann
Copy link
Author

Since the resolver was rewritten by 80cb1d5 in the meanwhile, this pull request is now obsolete.

@sebiniemann sebiniemann deleted the patch-1 branch October 22, 2018 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants