v-code-diff 1.13.0 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  > A code diff display plugin, available for Vue2 / Vue3.
8
8
 
9
9
  <p align='center'>
10
- <b>English</b> | <a href="https://github.com/Shimada666/v-code-diff/blob/master/README-zh.md">简体中文</a>
10
+ <b>English</b> | <a href="https://github.com/Shimada666/v-code-diff/blob/main/README-zh.md">简体中文</a>
11
11
  </p>
12
12
 
13
13
  Old Version:
@@ -47,6 +47,19 @@ yarn add v-code-diff
47
47
  pnpm add v-code-diff
48
48
  ```
49
49
 
50
+ Use the explicit entry for your Vue version. These entries do not depend on
51
+ `postinstall`, so they also work when the package manager blocks dependency
52
+ scripts:
53
+
54
+ | Vue version | Import path |
55
+ | --- | --- |
56
+ | Vue 2.6 | `v-code-diff/vue2` |
57
+ | Vue 2.7 | `v-code-diff/vue2.7` |
58
+ | Vue 3 | `v-code-diff/vue3` |
59
+
60
+ The legacy `v-code-diff` root entry remains available when dependency scripts
61
+ are enabled.
62
+
50
63
  Vue2.6 developers need install composition-api
51
64
 
52
65
  ```shell
@@ -61,7 +74,7 @@ pnpm add @vue/composition-api
61
74
  > Recommend using local registration for better tree-shaking support.
62
75
  ```vue
63
76
  <script setup>
64
- import { CodeDiff } from 'v-code-diff'
77
+ import { CodeDiff } from 'v-code-diff/vue3'
65
78
  </script>
66
79
 
67
80
  <template>
@@ -79,7 +92,7 @@ import { CodeDiff } from 'v-code-diff'
79
92
 
80
93
  ```ts
81
94
  import { createApp } from 'vue'
82
- import CodeDiff from 'v-code-diff'
95
+ import CodeDiff from 'v-code-diff/vue3'
83
96
 
84
97
  app
85
98
  .use(CodeDiff)
@@ -104,7 +117,8 @@ then
104
117
  > Recommend using local registration for better tree-shaking support.
105
118
  ```vue
106
119
  <script>
107
- import { CodeDiff } from 'v-code-diff'
120
+ // Use v-code-diff/vue2.7 instead when running Vue 2.7.
121
+ import { CodeDiff } from 'v-code-diff/vue2'
108
122
  export default {
109
123
  components: {
110
124
  CodeDiff
@@ -125,7 +139,8 @@ export default {
125
139
  #### Register globally
126
140
  ```ts
127
141
  import Vue from 'vue'
128
- import CodeDiff from 'v-code-diff'
142
+ // Use v-code-diff/vue2.7 instead when running Vue 2.7.
143
+ import CodeDiff from 'v-code-diff/vue2'
129
144
 
130
145
  Vue.use(CodeDiff)
131
146
  ```