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 1818 node-version : 12
1919 - name : Install dependencies
2020 run : npm ci
21- - name : Lint
22- run : npm run lint
23- - name : Test
24- run : npm run test
2521 - name : Build
2622 run : npm run build
2723 - 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 11# vue-diff
22
3- Vue diff viewer plugin
3+ Vue diff viewer plugin for Vue@3
44<a href =" https://hoiheart.github.io/vue-diff/demo/index.html " target =" _blank " >demo</a >
55
66> ⚠️ 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
3232
3333## Features
3434
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
4039
4140## Install plugin
4241
4342``` bash
4443npm install vue-diff
4544```
4645
47- install plugin in vue application
46+ And install plugin in vue application
4847
4948``` ts
5049import VueDiff from ' vue-diff'
51- // import VueDiff from 'vue-diff/dist/index.es5' // If need to use es5 build
50+
5251import ' vue-diff/dist/index.css'
5352
5453app .use (VueDiff )
@@ -71,6 +70,9 @@ Insert the diff component with props.
7170### Settings with default props
7271``` vue
7372<template>
73+ <!-- If the changed componentName
74+ <VueDiff>
75+ -->
7476 <Diff
7577 :mode="mode"
7678 :theme="theme"
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import autoprefixer from 'autoprefixer'
77import typescript from 'rollup-plugin-typescript2'
88import scss from 'rollup-plugin-scss'
99import css from 'rollup-plugin-css-only'
10- import babel from '@rollup/plugin-babel'
10+ import babel , { getBabelOutputPlugin } from '@rollup/plugin-babel'
1111
1212const options = {
1313 input : 'src/index.ts' ,
@@ -45,7 +45,11 @@ export default [
4545 output : {
4646 file : 'dist/index.js' ,
4747 format : 'esm'
48- }
48+ } ,
49+ plugins : [
50+ ...options . plugins ,
51+ getBabelOutputPlugin ( { plugins : [ '@babel/plugin-proposal-optional-chaining' ] } )
52+ ]
4953 } ,
5054 // es5 build
5155 {
You can’t perform that action at this time.
0 commit comments