-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat: Vue components, mount options, global options, and v3 support #1409
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
35ad5c5
Add vueOptions and vueGlobalOptions
jhildenbiddle cd8f2d3
Fix vueGlobalOptions.data checks
jhildenbiddle ecd053b
Support functions in docsify configuration
jhildenbiddle 5fa79eb
Fix Vue content detection and global options
jhildenbiddle a2386e5
Add vueComponents support
jhildenbiddle bc2e091
Ignore `el` property in Vue configs for Vue v2
jhildenbiddle 1774ab8
Initial commit
jhildenbiddle 6d152e2
Refactor regular expression usage
jhildenbiddle 758538c
Add `<output>`. Refactor `<pre>` and `<code>`.
jhildenbiddle 0193659
Update docs with new Vue features and usage
jhildenbiddle 8a56f72
Fix directive detection
jhildenbiddle 5a2dde1
Update docs
jhildenbiddle 1a52e97
Update docs
jhildenbiddle 86dae61
Rename `vueOptions` to `vueMountOptions`
jhildenbiddle 2946c06
Update test
jhildenbiddle 871e48f
Update default waitForSelector value
jhildenbiddle 131aae5
Fix waitForText() timeout and reject messages
jhildenbiddle af7e713
Change default startPath for tests & manual start
jhildenbiddle 25084f8
Update jest/docsify side-effect cleanup
jhildenbiddle 6a5e84b
Update directive detection (data vs static)
jhildenbiddle febe7f8
Remove global event listeners beforeEach
jhildenbiddle b6d5407
Fix basePath
jhildenbiddle 8362ed0
Remove unnecessary globals
jhildenbiddle f0a8d69
Fix basePath update when config is function
jhildenbiddle 5ec2256
Fix basePath & update route URLs
jhildenbiddle a9be6f2
Merge branch 'develop' into feat/vue-options
jhildenbiddle 3af1cfa
Add selector option to _logHTML
jhildenbiddle b33d750
Remove SRC_PATH global variable
jhildenbiddle cafdd62
Remove —runInBand flag from test script
jhildenbiddle d9e491a
Fix covepage test
jhildenbiddle a5a431f
Fix base element reset
jhildenbiddle 4e5dae7
Squashed commit of the following:
jhildenbiddle eae3ad8
Remove markdownlint config
jhildenbiddle 421ef1d
Update docs
jhildenbiddle 52cce02
Delete unnecessary file
jhildenbiddle 727ee8f
Rename `vueMountOptions` to `vueMounts`
jhildenbiddle 69efae3
Fix typos
jhildenbiddle 51451a4
Remove BLANK_URL global
jhildenbiddle a10fcbd
Update Vue-related descriptions
jhildenbiddle 9a1935a
Add support for Vue shorthand directive syntax
jhildenbiddle 43a73bb
Merge branch 'develop' into feat/vue-options
sy-records 7cf1e7c
Update Vue-related descriptions and links
jhildenbiddle 7878c60
Merge branch 'develop' into feat/vue-options
jhildenbiddle 90b67e2
Merge branch 'develop' into feat/vue-options
sy-records ffa7c90
Fix Lint
sy-records File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add support for Vue shorthand directive syntax
- Loading branch information
commit 9a1935ac644f55eb2d53e532b9f015b1ec3c40de
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not clear on the last bullet point. I guess if it'll start to explain this magic part, it might just need to go into more detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree this description could use some work. To be honest, I debated about even adding it. I've updated the description to (hopefully) make it more clear. At the end of the day, this text exists to help explain why this edge case won't work:
Example 1: This will work
In this example, docsify first mounts the top-level
<p id="test">
fromvueMounts
. Docsify then iterates over the top-level child elements (<p>
), skips the ones that contain or are themselves Vue instances, detects Vue template syntax in the top-level<p>
element, and mounts it usingvueGlobalOptions
. Great.Example 2: This will not work
Like the previous example, docsify first mounts the top-level
<p id="test">
fromvueMounts
. Docsify then iterates over the top-level child elements (<div>
), detects that<div>
contains a Vue instance (<p id="test">
) and skips that element. This behavior is explained in the following "Technical Notes" bullet point:I think it is highly unlikely that this will be an issue, but I added the related technical notes in hopes of making life easier for everyone if it does. The trick is how to do this succinctly without going into the same level of detail above. Hopefully the changes I've put in place are good enough for now. We can always revisit if/when needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhildenbiddle The example of what works vs what doesn't will be very helpful to some people. I think it'd be worth pasting what you wrote into the docs.