I was going to just submit this as a documentation pull request in the form of a tip, but as I tried to correctly word it, I realized I'm not sure where or how I should really submit this. Happy to take another crack at a real pull request if that makes sense.
The minor issue I ran into was that the intellisense and great functionality from vetur in VS Code wasn't working after installing vuepress locally to a project that doesn't otherwise use vue. After some confusion and a bit of trial and error, I realized that vetur is explicitly looking for vue to appear in the project's package.json file even though installing vuepress installs it as a dependency.
There is an incredibly simple workaround/answer of just also running yarn add -D vue and I'm guessing most current users would already have that installed locally. However, I'm a big fan of this project and had an immediate use to create some non-web-dev documentation and I'm guessing more people will start doing so as well.
I see two potential longer term approaches and that is why I'm creating this issue that hopefully both @yyx990803 and @octref might see.
vue locally to get the full functionality from veturvetur to look for a locally installed node_modules/vue instead of checking for the entry in package.jsonTo clarify what I found, I didn't actually have to run an "install", but I just added vue to my package.json dependencies and restarted VS Code in order for everything to start working.
A side note, thanks for all the great work on vuepress, vetur, Vue, and all the other related projects and efforts.
Thanks for your reporting!
Hey, @octref, Is vetur able to to looking for the dependencies in package-lock.json or yarn.lock, maybe it will be a better fix for this issue IMO.
@octref do you have any idea for that ?
Vetur needs to know the Vue version installed, as we use a different completion system to support Vue < 2.5 which does not have good typings.
I can do option 2. This will be tracked in vuejs/vetur#799.
@octref Cool, thanks!
We're closing this issue as stale as it's more than 20 days without activity, and without an associated Pull Request. Please feel free to continue discussion. We'll reopen this issue if anything actionable is posted.
The Vetur issue is fixed and will be released in next version.
@octref Cool!