This repository was archived by the owner on Feb 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Expand file tree Collapse file tree 4 files changed +40
-14
lines changed Original file line number Diff line number Diff line change 18
18
node-version : 12
19
19
- name : Install dependencies
20
20
run : npm ci
21
- - name : Lint
22
- run : npm run lint
23
- - name : Test
24
- run : npm run test
25
21
- name : Build
26
22
run : npm run build
27
23
- name : Demo
Original file line number Diff line number Diff line change
1
+ name : Test
2
+ on :
3
+ push :
4
+ branches :
5
+ - develop
6
+ jobs :
7
+ test :
8
+ name : test
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout
12
+ uses : actions/checkout@v2
13
+ with :
14
+ fetch-depth : 0
15
+ - name : Setup Node.js
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : 12
19
+ - name : Install dependencies
20
+ run : npm ci
21
+ - name : Lint
22
+ run : npm run lint
23
+ - name : Test
24
+ run : npm run test
Original file line number Diff line number Diff line change 1
1
# vue-diff
2
2
3
- Vue diff viewer plugin
3
+ Vue diff viewer plugin for Vue@3
4
4
<a href =" https://hoiheart.github.io/vue-diff/demo/index.html " target =" _blank " >demo</a >
5
5
6
6
> ⚠️ This plugin does not support Vue2
@@ -32,23 +32,22 @@ Here is the <a href="https://hoiheart.github.io/vue-diff/demo/index.html" target
32
32
33
33
## Features
34
34
35
- * [x] Support split / unified mode
36
- * [x] Support multiple languages and can be extended
37
- * [X] Support two themes (dark / light) and can be customized
38
- * [X] Virtual scroll for large text comparison (* Performance improvements are still needed.* )
39
- * [ ] Support IE11 (IE 11 support for Vue@3 is still pending)
35
+ * Support split / unified mode
36
+ * Support multiple languages and can be extended
37
+ * Support two themes (dark / light) and can be customized
38
+ * Virtual scroll for large text comparison
40
39
41
40
## Install plugin
42
41
43
42
``` bash
44
43
npm install vue-diff
45
44
```
46
45
47
- install plugin in vue application
46
+ And install plugin in vue application
48
47
49
48
``` ts
50
49
import VueDiff from ' vue-diff'
51
- // import VueDiff from 'vue-diff/dist/index.es5' // If need to use es5 build
50
+
52
51
import ' vue-diff/dist/index.css'
53
52
54
53
app .use (VueDiff )
@@ -71,6 +70,9 @@ Insert the diff component with props.
71
70
### Settings with default props
72
71
``` vue
73
72
<template>
73
+ <!-- If the changed componentName
74
+ <VueDiff>
75
+ -->
74
76
<Diff
75
77
:mode="mode"
76
78
:theme="theme"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import autoprefixer from 'autoprefixer'
7
7
import typescript from 'rollup-plugin-typescript2'
8
8
import scss from 'rollup-plugin-scss'
9
9
import css from 'rollup-plugin-css-only'
10
- import babel from '@rollup/plugin-babel'
10
+ import babel , { getBabelOutputPlugin } from '@rollup/plugin-babel'
11
11
12
12
const options = {
13
13
input : 'src/index.ts' ,
@@ -45,7 +45,11 @@ export default [
45
45
output : {
46
46
file : 'dist/index.js' ,
47
47
format : 'esm'
48
- }
48
+ } ,
49
+ plugins : [
50
+ ...options . plugins ,
51
+ getBabelOutputPlugin ( { plugins : [ '@babel/plugin-proposal-optional-chaining' ] } )
52
+ ]
49
53
} ,
50
54
// es5 build
51
55
{
You can’t perform that action at this time.
0 commit comments