diff --git a/packages/web/package.json b/packages/web/package.json index 6fb18471..3d94243f 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -49,5 +49,9 @@ "tslib": "^2.3.1", "typescript": "^4.4.3", "uuid": "^3.4.0" + }, + "dependencies": { + "diff": "^5.0.0", + "diff2html": "^3.4.13" } -} \ No newline at end of file +} diff --git a/packages/web/public/index.html b/packages/web/public/index.html index 1a4b3dfc..5d2c9c41 100644 --- a/packages/web/public/index.html +++ b/packages/web/public/index.html @@ -19,6 +19,7 @@ + diff --git a/packages/web/rollup.config.js b/packages/web/rollup.config.js index bd142e58..19ab3d99 100644 --- a/packages/web/rollup.config.js +++ b/packages/web/rollup.config.js @@ -51,6 +51,10 @@ export default { src: '../../node_modules/@mdi/font/fonts/*', dest: 'public/build/fonts/', }, + { + src: '../../node_modules/diff2html/bundles/css/diff2html.min.css', + dest: 'public/build/', + }, ], }), diff --git a/packages/web/src/elements/DiffView.svelte b/packages/web/src/elements/DiffView.svelte new file mode 100644 index 00000000..3a1cfa25 --- /dev/null +++ b/packages/web/src/elements/DiffView.svelte @@ -0,0 +1,37 @@ + + +